wiki.sine.space | sinespace

Difference between revisions of "Scripting/SRenderer"

From wiki.sine.space
Jump to: navigation, search
(Created page with "A renderer is what makes an object appear on the screen. The SRendererclass component interfaces with Unity's Renderer component, exposing its functions to scripting. ==Memb...")
 
Line 3: Line 3:
 
The SRendererclass component interfaces with Unity's Renderer component, exposing its functions to scripting.
 
The SRendererclass component interfaces with Unity's Renderer component, exposing its functions to scripting.
  
==Members==
+
=Members=
 +
==Miscellaneous==
 
{{ScriptFunction|bool|IsVisible|{ get; }|Returns true if the renderer is visible on any camera.}}
 
{{ScriptFunction|bool|IsVisible|{ get; }|Returns true if the renderer is visible on any camera.}}
{{ScriptFunction|bool|Enabled|{ get; set; }|Get/Set if the rendered object is visible.}}
+
{{ScriptFunction|bool|Enabled|{ get; set; }|Get/Set if the rendered object is visible.|-- Hide this object --<br>Space.Host.ExecutingObject.Renderer.Enabled = false;}}
 +
 
 +
==Materials==
 
{{ScriptFunction|SMaterial|Material|{ get; set; }|Get/Set the material instantiated to the renderer.}}
 
{{ScriptFunction|SMaterial|Material|{ get; set; }|Get/Set the material instantiated to the renderer.}}
{{ScriptFunction|SMaterial |SharedMaterial|{ get; set; }|Get/Set the shared material used by the renderer.}}
 
 
{{ScriptFunction|SMaterial|Materials[]|{ get; set; }|Get/Set all materials instantiated to the renderer.}}
 
{{ScriptFunction|SMaterial|Materials[]|{ get; set; }|Get/Set all materials instantiated to the renderer.}}
 +
 +
==Shared Materials==
 +
{{ScriptFunction|SMaterial |SharedMaterial|{ get; set; }|Get/Set the shared material used by the renderer.}}
 
{{ScriptFunction|SMaterial|SharedMaterials[]|{ get; set; }|Get/Set all shared materials used by the renderer.}}
 
{{ScriptFunction|SMaterial|SharedMaterials[]|{ get; set; }|Get/Set all shared materials used by the renderer.}}
 +
 
{{Scripting Navbox}}
 
{{Scripting Navbox}}

Revision as of 19:15, 19 April 2017

A renderer is what makes an object appear on the screen.

The SRendererclass component interfaces with Unity's Renderer component, exposing its functions to scripting.

Members

Miscellaneous

IsVisible

bool IsVisible { get; }

Returns true if the renderer is visible on any camera.

No example provided yet


Enabled

bool Enabled { get; set; }

Get/Set if the rendered object is visible.

No example provided yet


Materials

Material

SMaterial Material { get; set; }

Get/Set the material instantiated to the renderer.

No example provided yet


Materials[]

SMaterial Materials[] { get; set; }

Get/Set all materials instantiated to the renderer.

No example provided yet


Shared Materials

SharedMaterial

SMaterial SharedMaterial { get; set; }

Get/Set the shared material used by the renderer.

No example provided yet


SharedMaterials[]

SMaterial SharedMaterials[] { get; set; }

Get/Set all shared materials used by the renderer.

No example provided yet