x


Problem Building Streamed Scene Asset Bundle

Hello everyone. I'm still fairly new to Unity, so this is likely something small I'm overlooking. I've been searching for quite a while now and haven't found anything resembling the same problem I'm having.

I'm using Unity Pro and trying save a Unity scene as a streamable .unity3d file. I've literally created a new Unity project and copied and pasted the example code provided in the scripting reference (link text) into a new script. When I try to run the script (and compile this scene, which is just the default main camera), I briefly see a popup that reads "Compiling scripts" and then it crashes.

I receive two errors:

Assets/SaveScene.js(1,2): BCE0064: No attribute with the name 'MenuItem' or 'MenuItemAttribute' was found (attribute names are case insensitive).

Error building Player because scripts had compiler errors UnityEditor.BuildPipeline:BuildStreamedSceneAssetBundle(String[], String, BuildTarget) SaveScene:MyBuild() (at Assets/SaveScene.js:4)

Does anyone have any idea what might be causing the crash? Should Unity even be trying to compile scripts that the scene isn't dependent upon?

more ▼

asked Nov 01 '11 at 10:50 PM

ConstantlyFrustratedProgrammer gravatar image

ConstantlyFrustratedProgrammer
1 1 1 1

It's been a week and no responses regarding a solution. Is anyone at least able to recreate this problem following the same steps I took (new unity project, save the default scene, copy and paste the script from the link above into a script/code file, try to build)?

Nov 08 '11 at 06:36 PM ConstantlyFrustratedProgrammer
(comments are locked)
10|3000 characters needed characters left

2 answers: sort voted first

Hi Guys,

I have figured this out. What you have to do is pick the menu item that was created by your script, then BEFORE you select your scene to build the asset bundle for, you have to go back and comment out all of the script in the .cs or .js file that builds the menu items in your UI. What's happening is the unity player is trying to compile the script and it is not working. If you comment it out before it builds the asset bundle, it won't see the script and therefore, won't error out.

more ▼

answered Jan 25 at 08:34 PM

caesarhernandez gravatar image

caesarhernandez
1

(comments are locked)
10|3000 characters needed characters left

Unfortunately I too am having this problem. Using Unity 3.4.1 I have scenes that run fine but do not build with BuildPipeline.BuildStreamedSceneAssetBundle or BuildPipeline.BuildPlayer. Yet I have tried to build a single empty scene. I receive these errors.

Assets/Scripts/exporting/AutomatedExportResources.js(1,2): BCE0064: No attribute with the name 'MenuItem' or 'MenuItemAttribute' was found (attribute names are case insensitive). and

Error building Player because scripts had compiler errors UnityEditor.BuildPipeline:BuildPlayer(String[], String, BuildTarget, BuildOptions)

The compile process appears to be building much more than I anticipate for the empty scene. Is there a way to print or view the dependancies that the build methods BuildStreamedSceneAssetBundle or BuildPipeline.BuildPlayer are gathering?

more ▼

answered Dec 13 '11 at 08:39 AM

rgbohner gravatar image

rgbohner
31 2 2 4

(comments are locked)
10|3000 characters needed characters left
Your answer
toggle preview:

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Topics:

x744
x396
x15
x4

asked: Nov 01 '11 at 10:50 PM

Seen: 1965 times

Last Updated: Jan 25 at 08:34 PM