wiki.sine.space | sinespace

Scripting/SMeshRenderer

From wiki.sine.space
Revision as of 03:52, 13 October 2021 by Voidtech (Talk | contribs)

Jump to: navigation, search

Component of MeshRenderer.

Properties

Enabled

bool Enabled {get; set;}

Makes the rendered 3D object visible if enabled.

Space.Host.ExecutingObject.MeshRenderer.Enabled = false


--clicking this object will Enable/Disable it's Mesh Renderer component
thisGameObject = Space.Host.ExecutingObject
component = thisGameObject.MeshRenderer

OnClick = function()
component.Enabled =  not component.Enabled
end


thisGameObject.AddClickable()
thisGameObject.Clickable.OnClick(OnClick)