Quantcast
Channel: Answers for "Default Values for Components"
Browsing latest articles
Browse All 6 View Live

Answer by GuyTidhar

You can't do that exactly since the unity components are final and do not let you use inheritance and extend their capabilities. You can do one of 2 things: 1) Use a prefab - Create a game object. -...

View Article


Answer by Eric5h5

You can use a script with the Reset function to set up defaults: function Reset () { rigidbody.useGravity = false; } @script RequireComponent(Rigidbody); When you add that script to an object that...

View Article


Answer by ZorbaTHut

You can use the hierarchyWindowChanged callback to detect when something in the hierarchy has been added (which includes components), then change the values on a newly-added component. You have to be...

View Article
Browsing latest articles
Browse All 6 View Live


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