Quantcast
Channel: Answers by "Democide"
Browsing all 10 articles
Browse latest View live

Answer by Martin Sharkbomb

Another way to handle this, which works well if your objects don't move, is to save the position of the object before you start the animation. Like so: startPosition = transform.localPosition;...

View Article



Answer by Martin Sharkbomb

What you can do is get the button and then check for the corresponding axis, like so: if (Input.GetButtonDown("Horizontal") && Input.GetAxisRaw("Horizontal") > 0) { // Move to the right }...

View Article

Answer by Martin Sharkbomb

I've also had this issue, and decided to build a different solution: Toggle Buttons. ![alt text][1] It provides a better overview over the flags set but takes up more space in the Editor. You can check...

View Article

Answer by Martin Sharkbomb

You might want to look into the [FormerlySerializedAs("m_MyVariable")] attribute Blog: http://blogs.unity3d.com/2015/02/03/renaming-serialized-fields/ API:...

View Article

Answer by Martin Sharkbomb

All you need to really do is use the "isExpanded" field on the SerializedProperty: http://docs.unity3d.com/ScriptReference/SerializedProperty-isExpanded.html for example as such: public override void...

View Article


Answer by Democide

Another way to handle this, which works well if your objects don't move, is to save the position of the object before you start the animation. Like so: startPosition = transform.localPosition;...

View Article

Answer by Democide

What you can do is get the button and then check for the corresponding axis, like so: if (Input.GetButtonDown("Horizontal") && Input.GetAxisRaw("Horizontal") > 0) { // Move to the right }...

View Article

Answer by Democide

I've also had this issue, and decided to build a different solution: Toggle Buttons. ![alt text][1] It provides a better overview over the flags set but takes up more space in the Editor. You can check...

View Article


Answer by Democide

You might want to look into the [FormerlySerializedAs("m_MyVariable")] attribute Blog: http://blogs.unity3d.com/2015/02/03/renaming-serialized-fields/ API:...

View Article


Answer by Democide

All you need to really do is use the "isExpanded" field on the SerializedProperty: http://docs.unity3d.com/ScriptReference/SerializedProperty-isExpanded.html for example as such: public override void...

View Article
Browsing all 10 articles
Browse latest View live




Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>
<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596344.js" async> </script>