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 zacthespack · Oct 08, 2013 at 08:43 AM · androidbootcamp

BCE0019: 'order' is not a member of 'Object'.

I am being hit with this error when trying to run the bootcamp example on Android and am hoping someone here can help.

The code causing the error is:

 @script RequireComponent(Camera)
 @script ExecuteInEditMode
 
 private var _tex : RenderTexture[] = new RenderTexture[2]; 
 
 function OnEnable () {
     if (!SystemInfo.supportsImageEffects || !SystemInfo.supportsRenderTextures)
         enabled = false;
 }
 
 function OnRenderImage (source : RenderTexture, destination : RenderTexture) 
 {
     _tex[0] = source;
     _tex[1] = RenderTexture.GetTemporary(source.width, source.height);
     var releaseMe : RenderTexture = _tex[1];
     var index : int = 0;
     
     var sorted : Array = new Array();
     
     var i : int = 0;
     for (var fx : PostEffectsBase in GetComponents(PostEffectsBase)) 
     {
         if(fx && fx.enabled) 
         {    
             sorted[i++] = fx;
         }
     }    
     
     while (sorted.length) 
     {
         var indexToUse : int = 0;
         var orderValue : int = -1;
         for(i = 0; i < sorted.length; i++) {
             if(sorted[i].order > orderValue) {
                 orderValue = sorted[i].order;    
                 indexToUse = i;
             }
         }
         
         var effect : PostEffectsBase = sorted[indexToUse];
         if (effect.PreferRenderImage3())
         {
             effect.OnRenderImage3(_tex[index], _tex[1-index]);
         }
         else
         {
             effect.OnRenderImage2(_tex[index], _tex[1-index]);
             index = 1-index;
         }
         
         sorted.RemoveAt(indexToUse);
     }
     
     Graphics.Blit(_tex[index], destination);
     
     RenderTexture.ReleaseTemporary(releaseMe);
 }

line 35 seems to the be line

Comment
Add comment · Show 2
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 meat5000 ♦ · Oct 08, 2013 at 08:44 AM 0
Share

Tried this?

http://docs.unity3d.com/Documentation/ScriptReference/Array.Sort.html

avatar image zacthespack · Oct 08, 2013 at 08:48 AM 0
Share

@meat5000 not sure what to change to use this?

1 Reply

· Add your reply
  • Sort: 
avatar image
2
Best Answer

Answer by vexe · Oct 08, 2013 at 08:53 AM

You're using an Array, (similar to ArrayList in C#, which stores objects) you need to cast it back to PostEffectsBase at line 35 (of course, order isn't contained inside Object). From this:

"Javascript arrays are therefore somewhat easier to use than built-in arrays, however they are more costly in terms of performance. Another potential downside is that there are certain situations where you need to use explicit casting when retrieving items because of their 'untyped' nature"

Instead, don't use Array, use a generic List.

 var sorted : List.<PostEffectsBase> = new List.<PostEffectsBase>();

Also, since in your previous question you had trouble with missing variables, make sure that order is actually located in PostEffectsBase - You also now have to change any sorted.[Ll]ength to sorted.Count

Comment
Add comment · Show 3 · 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 zacthespack · Oct 08, 2013 at 08:57 AM 0
Share

I get

The name 'List' does not denote a valid type ('not found'). Did you mean 'UnityEngine.Light'?

avatar image vexe · Oct 08, 2013 at 09:00 AM 1
Share

Please visit the link in my answer. You have to do include the right namespace for it: using System.Collections.Generic; [C#] - import System.Collections.Generic; [JS]

avatar image devean · Jun 25, 2015 at 10:55 AM 0
Share

when I have done that ..error now says Assets/Scripts/Unity/ImageEffectsOrder.js(36,38): BCE0019: 'order' is not a member of 'PostEffectsBase'. what to do now

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

17 People are following this question.

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

Related Questions

Bootcamp demo for Android compile error (Unity 3.3) 1 Answer

Bootcamp Android - SmoothFollow.js(31,9): BCE0005: Unknown identifier: 'wantedRotationAngle 1 Answer

'TerrainData' does not denote a valid type 1 Answer

Android level doesn't want to work after Application.LoadLevel 1 Answer

What do I pass into Application.OpenURL to open up the Android market from an app? 2 Answers


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