Hello, Unity community!
I’m currently working on a Unity WebGL project with the following requirements:
Game Object Interaction:
I need to allow users to import game objects from their local file system.
Once imported, users should be able to modify the object’s transform (position, rotation, scale)within the Unity Game.
Uploading to the Server:
After the user makes modifications, I need to upload the game object (with its updated transform, mesh, and animation data) to my server.
The game object’s data should be stored on the server for future use and can be accessed later.
Retrieving and Reusing Game Objects in a New Session:
In a new WebGL session, I want the game object to be retrieved from the server along with its updated transform, mesh, and animation data, and placed back into the scene exactly as it was in the previous session.
Questions/Challenges:
Uploading the Game Object: How can I efficiently serialize the game object (including its transform, mesh, and animations) into a format that can be uploaded to the server? Should I use JSON, a binary format, or something else?
Server-Side Handling: What is the best way to store these game objects on the server? Should I save the data as individual components (transform data, mesh data, animation clips) or as a combined object?
Retrieving the Game Object: Once the object is uploaded, how can I reconstruct it in the new Unity WebGL session? What approach should I take to restore its transform, mesh, and animation data?
Cross-session Compatibility: How do I ensure that the game object will load and appear exactly the same in different WebGL sessions, maintaining the integrity of its data?
If anyone has experience with similar workflows or can provide insight into how to best approach this, I’d greatly appreciate it!