C# Class UnityPlatformer.InstancePrefab

Instance a prefab on start
Inheritance: UnityEngine.MonoBehaviour
Mostrar archivo Open project: llafuente/unity-platformer Class Usage Examples

Public Properties

Property Type Description
attachToRoot bool
placeholder UnityEngine.Sprite
prefab UnityEngine.GameObject

Public Methods

Method Description
Awake ( ) : void

NOTE no virtual on purpose. override OnAwake

OnAwake ( bool notify = true ) : void

Instance the prefab, rename and attach it

OnDrawGizmos ( ) : void

Draw placeholder + name in editor mode.

Rename ( Transform transform ) : void

Rename logic: append counter to the name

Method Details

Awake() public method

NOTE no virtual on purpose. override OnAwake
public Awake ( ) : void
return void

OnAwake() public method

Instance the prefab, rename and attach it
public OnAwake ( bool notify = true ) : void
notify bool true -> SendMessage: OnInstancePrefab
return void

OnDrawGizmos() public method

Draw placeholder + name in editor mode.
public OnDrawGizmos ( ) : void
return void

Rename() public method

Rename logic: append counter to the name
public Rename ( Transform transform ) : void
transform UnityEngine.Transform
return void

Property Details

attachToRoot public_oe property

Attach the prefab as a child or at root node.
public bool attachToRoot
return bool

placeholder public_oe property

Placeholder sprite for editor, to see something
public Sprite,UnityEngine placeholder
return UnityEngine.Sprite

prefab public_oe property

Prefab to instance
public GameObject,UnityEngine prefab
return UnityEngine.GameObject