Closed chengxuz closed 7 years ago
Hi @chengxuz Problem should be fixed now.
@pbashivan , thanks for quick response! But I still got some error messages, such as
Assets/Scripts/AssetBundles.cs(21,51): error CS0103: The name `Selection' does not exist in the current context
Assets/Scripts/AssetBundles.cs(42,50): error CS0103: The name `PrefabUtility' does not exist in the current context
Assets/Scripts/AssetBundles.cs(52,10): error CS0246: The type or namespace name `MenuItem' could not be found. Are you missing a using directive or an assembly reference?
Assets/Scripts/AssetBundles.cs(52,10): error CS0246: The type or namespace name `MenuItemAttribute' could not be found. Are you missing a using directive or an assembly reference?
etc...
But I still could run the scene. So I guess the problem is still about Editor?
Best, Chengxu
Oops! Sorry, I should have put all the code within the UNITY_EDITOR section. Basically, we need to put all the code that uses Editor functionality inside a #if UNITY_EDITOR section. Can you try and see if it's fixed now?
Great! I think the issue has been solved now. I am going to close the event.
Hi, @pbashivan , during building the project, I got an error message of "The type or namespace name 'UnityEditor' could not be found". After some google, I think "AssetBundles.cs" should be placed under "Editor" folder, otherwise the project could not be built, only run through Unity Editor.