- Home /
BuildSreamedScene : The class defined in script file named '***' does not match the file name!
Hello,
I have a big main project which loads streamed scenes that were made in other projects. Here's the structure:
Main Project: This project only contains a loader and basic operations.
Project 1: Contains the logic, etc for this situation and I export the scenes as AssetBundle for loading them in the main project.
Project 2: Contains the logic, etc for this situation and I export the scenes as AssetBundle for loading them in the main project.
...
I'm able to load this streamed scenes as asset bundles in the main project but the streamed scenes can't find any scripts that I used so they don't work.
I divided the project this way because it will be very large, with many sub projects. I researched on the Unity forums and some people say that scripts can not be exported in AssetBundle. Is there any other way to solve this?
Thank you!
Answer by Ed unity · Mar 14, 2014 at 03:31 PM
You must put all of the scripts that are going to be used in the project directly in the main project. This is because the compiling and linking must be done prior to runtime. Your only option is to include all scripts in the Main project and then you can load in the asset bundles as you see fit.