Changes

Jump to navigation Jump to search
270 bytes added ,  15:35, 5 March 2020
Line 32: Line 32:     
You can add Unity components to any tranforms and objects by using the '''TransformParent''' record in a table that has the same name as the UnityComponent you want to add. As an example, you can add a Unity '''Light''' component to a '''Transform''' and pass the transform's name to the '''Furniture''' component's '''ColorableLights''' list and you now have a light that changes color based on what the player picks. Just make sure they are defined in the correct order (You can't refer to a TransformParent that hasn't been created yet).
 
You can add Unity components to any tranforms and objects by using the '''TransformParent''' record in a table that has the same name as the UnityComponent you want to add. As an example, you can add a Unity '''Light''' component to a '''Transform''' and pass the transform's name to the '''Furniture''' component's '''ColorableLights''' list and you now have a light that changes color based on what the player picks. Just make sure they are defined in the correct order (You can't refer to a TransformParent that hasn't been created yet).
 +
 +
Transforms
 +
[
 +
{
 +
Name LightUp
 +
Position [ 0; 0.5; 0 ]
 +
Rotation [ 0; 0; 0 ]
 +
}
 +
]
 +
Light
 +
{
 +
TransformParent LightUp
 +
range 10
 +
intensity 10
 +
}
 +
Furniture
 +
{
 +
ColorPrimaryEnabled True
 +
LightPrimary True
 +
ColorableLights [ LightUp ]
 +
}
    
=== Naming your furniture ===
 
=== Naming your furniture ===

Navigation menu