C# Class ActionTool.GPActionUtils

Mostra file Open project: trfd/Unity-ActionTool Class Usage Examples

Public Methods

Method Description
CreateGPActionObject ( GameObject parentObj ) : GameObject

Creates a default GPActionObject if not existing. Returns the created GameObject or the existing GPActionObject

DestroyGPActionObject ( GameObject parentObj ) : void

Destroys an GPActionObject

GetGPActionObject ( GameObject parentObj ) : GameObject

Returns the attached GPActionObject if any

GetGPActionObjectMapper ( GameObject parentObj ) : ActionTool.GPActionObjectMapper

Returns the attached GPActionObjectMapper if any

GetGPActionObjectMapperOrCreate ( GameObject parentObj ) : ActionTool.GPActionObjectMapper

Returns the GPActionObjectMapper attached to the specified GameObject if any. Otherwise creates a GPActionObject it and return the newly created GPActionObjectMapper;

GetGPActionObjectOrCreate ( GameObject parentObj ) : GameObject

Returns the GPActionObject attached to the specified GameObject if any. Otherwise creates it and return the newly created GPActionObject;

HasGPActionObject ( GameObject parentObj ) : bool

Returns whether or not the specified gameobject has a GPActionObject attached

InitGPActionObject ( GameObject gpactionParent, GameObject gpactionObj ) : void

Init a GameObject owner GPAction (a so-called "GPActionObject"). That is, the object is hid in the hierarchy and parent transform is set to parent gameobject

Method Details

CreateGPActionObject() public static method

Creates a default GPActionObject if not existing. Returns the created GameObject or the existing GPActionObject
public static CreateGPActionObject ( GameObject parentObj ) : GameObject
parentObj GameObject
return GameObject

DestroyGPActionObject() public static method

Destroys an GPActionObject
public static DestroyGPActionObject ( GameObject parentObj ) : void
parentObj GameObject
return void

GetGPActionObject() public static method

Returns the attached GPActionObject if any
public static GetGPActionObject ( GameObject parentObj ) : GameObject
parentObj GameObject
return GameObject

GetGPActionObjectMapper() public static method

Returns the attached GPActionObjectMapper if any
public static GetGPActionObjectMapper ( GameObject parentObj ) : ActionTool.GPActionObjectMapper
parentObj GameObject
return ActionTool.GPActionObjectMapper

GetGPActionObjectMapperOrCreate() public static method

Returns the GPActionObjectMapper attached to the specified GameObject if any. Otherwise creates a GPActionObject it and return the newly created GPActionObjectMapper;
public static GetGPActionObjectMapperOrCreate ( GameObject parentObj ) : ActionTool.GPActionObjectMapper
parentObj GameObject
return ActionTool.GPActionObjectMapper

GetGPActionObjectOrCreate() public static method

Returns the GPActionObject attached to the specified GameObject if any. Otherwise creates it and return the newly created GPActionObject;
public static GetGPActionObjectOrCreate ( GameObject parentObj ) : GameObject
parentObj GameObject
return GameObject

HasGPActionObject() public static method

Returns whether or not the specified gameobject has a GPActionObject attached
public static HasGPActionObject ( GameObject parentObj ) : bool
parentObj GameObject
return bool

InitGPActionObject() public static method

Init a GameObject owner GPAction (a so-called "GPActionObject"). That is, the object is hid in the hierarchy and parent transform is set to parent gameobject
public static InitGPActionObject ( GameObject gpactionParent, GameObject gpactionObj ) : void
gpactionParent GameObject
gpactionObj GameObject
return void