trilitech / tezos-unity-sdk

Tezos Unity SDK for developers. Discover the future of Web3 gaming.
https://tezos.com/unity
MIT License
24 stars 12 forks source link

WebGL staging during development [question] #117

Closed AlexandrosGounis closed 10 months ago

AlexandrosGounis commented 1 year ago

If this is not the right place please close this issue.

Suppose we want to touch typescript in the Demo Example. Our understanding is that we have to copy & paste the output (WebGL related) folders manually, which are then cached within Library/PackageCache. Each time we have to make a change, we have to create a new build (with WebGL as the target), and run that locally.

What would the ideal development flow be? This includes touching .ts files, and/or .cs files.

Our view is that this kind of development can be very slow and inefficient and we would like to explore more options on how to improve web/typescript integration and the development experience for those who want to work with Tezos Unity SDK & WebGL builds

k-karuna commented 1 year ago

Hi @AlexandrosGounis. You are going to add some improvements for SDK?

All interactions between .cs code and .js bundle happens through BeaconConnectorWebGL So, all you need is to pass correct data to input and correct handle output for all method of IBeaconConnector During developing in .ts files you should always run npm run build to create relevant bundle.

When you click Build and run button in Unity editor, it will suggest you to choose directory where to store static files, so you can setup your webpack config to save output file in this directory to update .js bundle. Thereby you can refresh you runnng WebGL localhost after npm run build to run relevant .js code.

oskar-ziller commented 10 months ago

Closing this, feel free to create a new one if you have further problems/questions.