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
1
Question by ninjarob · Jan 03, 2012 at 12:45 PM · flashstandard assets3.5

Unity 3.5 standard assets bug

Hi i've been playing with the unity 3.5 developers preview trying to convert some projects i've been makeing over to flash and just generaly get a feel for it.

I've notised that 3.5 doesn't seem to deal with standard assets correctly im not entirely sure whats going wrong but in every project i've tried to compile i get problems with scripts in standard assets.

You can replicate the issue by trying to compile the explosion framework test level to flash in a blank project.

http://unity3d.com/support/resources/unity-extensions/explosion-framework.html

problem seems to be that it doesn't recognize some of the classes that are defined in Standard assets in this case the "Detonator" class

At a guess it seems that accessing C sharp scripts from javascript is now broken something to do with the first pass compile but i'm not positive of that.

does anyone know whats going on here?

Update: Ok summited a bug report to unity and got this back

Hi,

This is a known limitation, standard assets haven't been adapted for flash just yet. We're working on this for future builds.

Regards, Oleg

So wait basicly :)

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 Julien-Lynge · Jan 04, 2012 at 04:31 PM 0
Share

Very good to know, thanks!

3 Replies

· Add your reply
  • Sort: 
avatar image
2

Answer by ninjarob · Jan 04, 2012 at 10:01 AM

Thanks for the reply unfortunately the project i'm useing was writen for IOS so its already writen with strict typeing.

And the specific compiler errors are

Assets/Standard Assets/Detonator/TestScene/DetonatorTest.js(102,93): BCE0019: 'size' is not a member of 'UnityEngine.Component'.

Assets/Standard Assets/Detonator/TestScene/DetonatorTest.js(105,63): BCE0019: 'detail' is not a member of 'UnityEngine.Component'.

However after some experimentation the root cause seems to be that C# classes stored in standard assets are no longer accessable to JS scripts.

if you import the explosion framework i've linked to above into a blank project and try and compile the test level to flash that will reproduce the error and you can have a play.

I should add that the same project will compile to exe, unity webplayer, ISO etc without throwing any errors.

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 Julien-Lynge · Jan 03, 2012 at 06:30 PM

Can you tell us what specific error the compiler is returning?

If you read the release notes for 3.5, they state that they've moved to pragma strict for all Javascript files, whereas this wasn't required before.

 Creating a new JavaScript automatically adds #pragma strict by default. 

I would not be at all surprised if, during the update process, Unity is adding #pragma script to files and this is breaking them. You should hopefully be able to remove this directive and the files will work again. If you can't do a search for "pragma strict" to see various articles on it. In a nutshell, typecasting is now a lot stricter than it was in older versions of unityscript.

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
Wiki

Answer by boriel · Aug 11, 2013 at 03:28 PM

This bug persist in Unity4. I've translated the class to C# and now it works ok.

Just delete the file DetonatorTest.js and put the attached DetonatorTest.cs in the same folder. Also in the Main Camera object, replace the original .js Detonator Test behavior with this one. At least, it worked for me.

[1]: /storage/temp/14175-detonatortest.cs.zip


detonatortest.cs.zip (1.4 kB)
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

6 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

Help getting started with ActionScript 1 Answer

3.5 Flash Export - Compiles fine, but no resources 0 Answers

.NET code in Flash export (3.5 beta) 1 Answer

Make enemy Flash when Hit 3 Answers

Flash Build Question for 3.5 beta 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