ChainSafe / web3.unity

🕹 Unity SDK for building games that interact with blockchains.
GNU Lesser General Public License v3.0
922 stars 237 forks source link

IPFS/Marketplace image uploads for samples in WebGL & other platforms #959

Closed juans-chainsafe closed 5 months ago

juans-chainsafe commented 6 months ago

Describe the bug Right now iPFS samples works for the editor and iOS build but we need to implement them to work in WebGL

Steps Steps to reproduce the behavior:

  1. Set your bucket ID and API key in IPFS calls (SampleMain scene)
  2. Build with WebGL
  3. Use the scene [SampleLogin or SampleLogin - Web3Auth]
  4. Login with [Web3Auth or Remote wallet]
  5. Click on each of the IPFS samples

Expected behavior

Desktop (please complete the following information):

sneakzttv commented 6 months ago

Will implement a JS function to hook around this after the marketplace. It's happening because webgl has limited system access due to its environment.

juans-chainsafe commented 6 months ago

This is breaking Desktop builds as well

/Users/juanmanuelspoleti/Desktop/workspace/web3.unity/Packages/io.chainsafe.web3-unity/Runtime/Scripts/EVM/IPFS/IPFS.cs(65,33): error CS0234: The type or namespace name 'EditorUtility' does not exist in the namespace 'UnityEditor' (are you missing an assembly reference?)

/Users/juanmanuelspoleti/Desktop/workspace/web3.unity/Packages/io.chainsafe.web3-unity/Runtime/Scripts/EVM/IPFS/IPFS.cs(125,33): error CS0234: The type or namespace name 'EditorUtility' does not exist in the namespace 'UnityEditor' (are you missing an assembly reference?)

Make sure to work both for WebGL and Desktop

sneakzttv commented 5 months ago

My mistake, assumed we checked over this in the last PR, will fix now.

sneakzttv commented 5 months ago

Errors are fixed, just a lib issue mac side remaining, will create a seperate issue for it and merge so we can fix builds for now

https://github.com/ChainSafe/web3.unity/issues/974