Comments (8)
Start is called in Awake below
from cs7038.
so that's always the case, then?
from cs7038.
I added the Awake method in c41461b, to make sure spriteRenderer is initialized before using LaserEmitter.Direction.
from cs7038.
THAT LOOKS WRONG. :)
from cs7038.
I will try removing the Awake and see if there's another solution.
from cs7038.
no worries, i've already changed it now, will commit it in a minute.
from cs7038.
http://goo.gl/sWzunQ this thread may help.
from cs7038.
This is really simple:
- Use Awake for all initialization logic that does not depend on other objects.
- Use Start for all initialization logic that depends on other objects.
Just using either Start or Awake is fine in most cases, but in some cases we do need to be more specific.However, calling ANY Unity method manually is a bad idea. The very reason why these methods are private by default is to prevent other scripts from accessing them.
But here is one detail that might be important someday (it was to me when I wrote GroupManager): Awake will always be called, but Start might not if the script is inactive after the Awake method (by disabling it in the Inspector or by calling this.enabled = false in the Awake method), in which case it will be called when the script is activated.
from cs7038.
Related Issues (20)
- 2 lasers one mirror - Test on Level 11
- Looped sfx do not resume when pause/unpause
- Fountain animation erratic when having two fountains next to player
- Pushing bug with multiple pushables.
- Laser depth visibility must improve HOT 3
- "Laser" speed HOT 2
- Pausing while washing hands HOT 1
- Squashed sound effect
- Level selector hangs up the first time HOT 2
- Level selector sliding to second+ page
- Google plus? HOT 3
- Star thump sound
- Animation bug with fountain and patient
- Vibrating for mobile phones
- Keyboard controls no longer work HOT 3
- The latest version does not compile! HOT 1
- Optimize Group Manager
- Sharing image url
- Encapsulating AudioSource HOT 1
- iOS portrait orientation
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cs7038.