Coder Social home page Coder Social logo

postchain-client-ue4's Introduction

Installation guide

Pre-requirements

  1. Unreal Engine 4 or 5
  2. Visual Studio (I tested on both 2017 and 2019)
  3. Node JS
  4. Docker(Optional)

Build Unreal Engine plugin

!!! VERY IMPORTANT: IF YOU WANT TO MODIFY UASSETS, PLEASE DO THIS IN UE4 VERSION OR ON A SEPARATED BRANCH, BECAUSE YOU WILL NOT BE ABLE TO USE UASSETS MODIFIED IN UE4 ON UE5. UNFORTUNATELY UASSETS ARE NOT BACK COMPATIBLE.

  1. Clone https://github.com/Cherden/postchain-client-cpp under \Plugins\ChromaClient\Source\ChromaClient\ . Make sure new cloned dir name is chroma-cpp-pure The structure should look like this at this moment: image

  2. Right click on ChromaClientTest.uproject->GenerateProjectFiles . Wait for ChromaClientTest.sln to be generated. Note: If you want to change Engine version, then:

    • git clean -fdx
    • Right click on ChromaClientTest.uproject->SwitchUnrealEngineVersion
  3. Open ChromaClientTest.sln

  4. Make sure build configuration is Development Editor & Win64

  5. Build & Run solution.

Configure blockchain

  1. Generate a new admin keypair with optional keygen. If running locally the following test keys can be used:

    • private key: 3132333435363738393031323334353637383930313233343536373839303131
    • public key: 0350fe40766bc0ce8d08b3f5b810e49a8352fdd458606bd5fafe5acdcdc8ff3f57
  2. Open Config/blockchain-config.sample.json and update private key. Brid and url will be automatically set

  3. Go into Rell/rell/config/local/run.xml and put the public key in

    <args module="common">
      <arg key="admin_pubkey">
        <bytea>PUBKEY HERE</bytea>
      </arg>
    </args>
  1. Copy the file /Administration/.env.sample, name it .env.
  2. Open the .env file you juts created in the Administration folder and paste the private key after "ADMIN_PRIV_KEY=". Save it
  3. Run blockchain
  • If you want to run blockchain with Docker:
    • Open terminal as Administrator
    • cd /Administration
    • npm i
    • npm start
  • If you don't want to use Docker, then:
  1. After this point restart ChromaClientTest.sln Visual studio instance, and UE4 project, for some environment variables to be updated.
  2. Use a browser (not Mozilla Firefox!) to go to http://localhost:7740/brid/iid_0. Copy the RID shown.
  3. Open https://dev.vault.chromia-development.com/ and create a Custom D-App. Name: Chromia Unity, Host: http://localhost, Port: 7740, Website: http://localhost, and paste the RID into ChainID.

Test PostchainDemo scene

  1. Open Content/PostchainDemoLevel
  2. Play

Test SSODemo scene

  1. Prepare node local auth script. This will launch a small js server wich will intercept the rawTx code from SSO auth success, and transfers it to UE4 plugin, via some json file.
  • cd SSOAuthServer/
  • node index.js
  1. Open Content/SSODemoLevel
  2. Play

Test LoginUserDemo scene

In this scene you can create/remove players, and give assets to them.

  1. Open Content/LoginUserDemoLevel
  2. Play

postchain-client-ue4's People

Contributors

yevhendev645 avatar

Stargazers

 avatar

Watchers

 avatar

postchain-client-ue4's Issues

Unable to build ChromaClientTest.sln

This is the error from the build output.

1>C:\Program Files\OpenSSL-Win64\include\openssl/types.h(180): error C2365: 'UI': redefinition; previous definition was 'namespace'
1> C:\Program Files\Epic Games\UE_4.27\Engine\Source\Runtime\CoreUObject\Public\UObject/ObjectMacros.h(772): note: see declaration of 'UI'


This is the end of the output when the build fails.

1> [11/15] UE4Editor-ChromaClientTest.lib
1> Creating library C:\Users\Oliwer\Documents\Unreal Projects\postchain-client-ue4-main\Intermediate\Build\Win64\UE4Editor\Development\ChromaClientTest\UE4Editor-ChromaClientTest.lib and object C:\Users\Oliwer\Documents\Unreal Projects\postchain-client-ue4-main\Intermediate\Build\Win64\UE4Editor\Development\ChromaClientTest\UE4Editor-ChromaClientTest.exp
1>C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Microsoft\VC\v170\Microsoft.MakeFile.Targets(50,5): error MSB3073: The command ""C:\Program Files\Epic Games\UE_4.27\Engine\Build\BatchFiles\Rebuild.bat" ChromaClientTestEditor Win64 Development -Project="C:\Users\Oliwer\Documents\Unreal Projects\postchain-client-ue4-main\ChromaClientTest.uproject" -WaitMutex -FromMsBuild" exited with code -1.
1>Done building project "ChromaClientTest.vcxproj" -- FAILED.
========== Rebuild All: 0 succeeded, 1 failed, 0 skipped ==========
========== Elapsed 01:09,779 ==========


Looks like it might be a conflict between OpenSLL and UnrealEngine types.

I have tried adding the following to "ChromaClient.cpp" as a suggestion from forums but without success :

#define UI UI_ST
THIRD_PARTY_INCLUDES_START
#include "openssl/types.h"
THIRD_PARTY_INCLUDES_END
#undef UI

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.