1

I am developing a project in unity

The scenario is that we have the main application, in which we want to receive different scenes from the server and display them in the program.

I output the scenes using the asset bundle and upload them to the server

The problem here is that the scripts that were inside the scenes do not exist

How can I solve this problem?

And do you suggest another solution to implement this scenario?

derHugo
  • 83,094
  • 9
  • 75
  • 115
Erfankh
  • 33
  • 1
  • 6
  • 1
    Why don't you just include the scenes in the build by adding local scene files in your project's build settings, and then stream assets using the StreamingAssets functionality if you have to stream them? Could you explain a bit more, because I think there might be a better solution. – IBXCODECAT Jun 02 '21 at 13:44
  • 1
    Hello Our application is for VR oculus in the field of medical education We want to create a main application and add different medical scenarios to it We have 2 scenarios at the moment and these scenarios will increase in the future, Now we want to load the scenarios dynamically in the server and display them in the main application and the user can enter the game by clicking on each scenario I searched the internet and the asset bundle could be a good option to implement this method, but the code does not load in the asset bundle Can you suggest a better solution? Thankful – Erfankh Jun 02 '21 at 15:20
  • 1
    So your saying that your c# scripts do not load in the asset bundle, but your scenes do? Interesting... Well in that case I guess you could store your scripts within the project and have a Json file in your assetbundle that points out names of scripts needed in that scene. Then you could automatically add them as monobehaviour components. I know that this solution probably isn't viable, however it's the only solution I know. ;( – IBXCODECAT Jun 03 '21 at 16:20
  • 1
    Thanks for your helping, I found a package for this, but I do not know if I can implement this scenario with this package https://assetstore.unity.com/packages/tools/utilities/sg-patcher-update-your-game-easily-in-app-163468 – Erfankh Jun 03 '21 at 16:42
  • 1
    Well if it does not work for you please let me and the community know, because I'm sure people do not want to spend $65 if that package/asset does not meet this scenario's needs. If this does work for you please put it in as an answer. Thanks. – IBXCODECAT Jun 03 '21 at 17:00
  • Yes, I will definitely answer it for you – Erfankh Jun 03 '21 at 17:21

0 Answers0