Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 13 Next capture
2021 2022 2023
1 capture
13 Jun 22 - 13 Jun 22
sparklines
Close Help
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
avatar image
0
Question by ConstantlyFrustratedProgrammer · Nov 01, 2011 at 10:50 PM · sceneassetbundlebuildassetbundlestreamed scene

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?

Comment
Add comment · Show 1
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image ConstantlyFrustratedProgrammer · Nov 08, 2011 at 06:36 PM 0
Share

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)?

2 Replies

· Add your reply
  • Sort: 
avatar image
0

Answer by snotbubblelou · Dec 13, 2011 at 08:39 AM

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?

Comment
Add comment · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image
0

Answer by caesarhernandez · Jan 25, 2013 at 08:34 PM

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.

Comment
Add comment · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

Your answer

Hint: You can notify a user about this post by typing @username

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

Answers Answers and Comments

4 People are following this question.

avatar image avatar image avatar image avatar image

Related Questions

Why does a scene loaded from an Asset Bundle returns empty string when getting its name? 0 Answers

How to get the names of scene in AssetBundle? 1 Answer

How do I load an entire scene using Assetbundles? 1 Answer

How to create and load an assetBundle containing many scenes and dependancies ? 0 Answers

'Resource file has already been unloaded' error when exiting application in Editor 1 Answer


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges