Changes

Jump to navigation Jump to search
30 bytes added ,  14:58, 6 February 2020
Line 128: Line 128:     
=== Components ===
 
=== Components ===
Other than the tags described so far, all tags are interpreted as Unity MonoBehaviour components. If you added a tag called “<BoxCollider>”, the children tags would be interpreted as variables of the BoxCollider component and if the component does not exist, it will be instantiated for the Furniture. All MonoBehaviour variables in a Component will use the ComponentName reference set in the other tags, or alternatively you can add a Transforms tag to define empty objects with a Name, Position and Rotation. Using “self” as a value for a MonoBehaviour variable will find the corresponding component in the furniture object itself. This allows for anything to be added to a furniture, even MonoBehaviors from custom mods.
+
Other than the elements described so far, all tables added to the root table are interpreted as Unity MonoBehaviour components. If you added a table called '''BoxCollider''', the children records would be interpreted as variables of the BoxCollider component and if the component does not exist, it will be instantiated for the Furniture. All MonoBehaviour variables in a Component will use the '''ComponentName''' record set in the other tags, or alternatively you can add a Transforms tag to define empty objects with a Name, Position and Rotation. Using '''self''' as a value for a MonoBehaviour variable will find the corresponding component in the furniture object itself. This allows for anything to be added to a furniture, even MonoBehaviors from custom mods.
   −
If you set the Parent attribute to a ComponentName reference or Transforms reference, the component will be fetched/added to the object instead. This could be used to add a PointLight component to an empty object to make your own lights. Make sure to add a LampScript component to your furniture object if you’re making a custom lamp, so the game can control shadows and lighting.
+
If you set the '''ParentTransform''' record to a '''ComponentName''' reference, the component will be fetched/added to the object instead. This could be used to add a PointLight component to an empty object to make your own lights. Make sure to add a LampScript component to your furniture object if you’re making a custom lamp, so the game can control shadows and lighting.
    
Setting a Destroy attribute to “True” for a tag will remove that MonoBehavior from the furniture.
 
Setting a Destroy attribute to “True” for a tag will remove that MonoBehavior from the furniture.

Navigation menu