web3.unity icon indicating copy to clipboard operation
web3.unity copied to clipboard

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

Open juans-chainsafe opened this issue 1 year ago • 3 comments

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

  • Upload Image works
  • Upload Metadata works
  • Upload Image & Metadata works

Desktop (please complete the following information):

  • Chainsafe SDK version: [dev]
  • Platform [WebGL]
  • Unity Version: [e.g., 2022.1]
  • Operating System: [Mac]

juans-chainsafe avatar May 15 '24 15:05 juans-chainsafe

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.

sneakzttv avatar May 15 '24 15:05 sneakzttv

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

juans-chainsafe avatar May 16 '24 12:05 juans-chainsafe

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

sneakzttv avatar May 22 '24 14:05 sneakzttv

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

sneakzttv avatar May 24 '24 15:05 sneakzttv