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 DESTRUKTORR · Aug 06, 2012 at 04:08 PM · memorystartawakeoffcut

Start/Awake cut off at a certain point?

I've noticed that the Start() and Awake() methods won't read all the way through (I'm using C#, I don't know if the same issue would come up with JS), after a certain amount of code is added. I had spent a great deal of time debugging before I realized this was the issue I was running into, the first time... Can anyone give me any sort of confirmation that this is -supposed- to happen, and how much memory/time/whatever these methods are allotted before they are cut off?

I should note, as soon as I replaced the script with a method call, and copied/pasted all the exact code from those methods into there, it all executed just fine.

Thanks!

Comment
Add comment
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

1 Reply

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

Answer by Bluk · Aug 06, 2012 at 04:39 PM

Hi,

I didn't find any evidence that there is indeed a time cap into Start() and Awake(). I tested this in JS:

 function Start () {
  for (var i =0 ; i<Mathf.Infinity; i++)
  {
  Debug.Log("Lol");
  }
 }

And it just seems to loop forever (as it should), i waited like 2 mins.

Maybe it is on the amount of code, but I don't think so. My best guess is that you were doing some stuff on objects that weren't yet properly initialized.

Cheers,

Bluk

Comment
Add comment · Show 2 · 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 DESTRUKTORR · Aug 06, 2012 at 05:20 PM 0
Share

Yeah, I'm not really sure what happened, to be honest, but I had used a for loop with C# with setting a number of different variables. It's not a massive problem, but I was curious if anyone knew if there was, in fact, a limit, since as soon as I redirected the code through a void method, it worked fine. It might be the way Unity runs C# code, but I don't know for sure.

I appreciate the effort, though!

avatar image DESTRUKTORR · Aug 17, 2012 at 02:34 AM 0
Share

I'm just gonna go ahead and call this one a bug, or something, since I haven't actually run into this issue again, since. Thanks for the help! :D

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

9 People are following this question.

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

Related Questions

TransformPoint - different results in Awake() and Start() 0 Answers

Awake/Start/Update order 1 Answer

GameObjects Created Twice from Application.LoadLevel? 0 Answers

Difference between Awake() and Start() ??? 2 Answers

Execution Order of Scripts - Awake and OnEnable 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