Class ObjectCreationButtonData
(Obsolete) Used to create a game object in the editor and with a button
Namespace: Unity.MARS
Syntax
public abstract class ObjectCreationButtonData : ScriptableObject
Fields
m_ButtonName
Name of the object being created
Declaration
protected string m_ButtonName
Field Value
| Type | Description |
|---|---|
| String |
m_Icon
Icon used for the object creation button
Declaration
protected DarkLightIconPair m_Icon
Field Value
| Type | Description |
|---|---|
| DarkLightIconPair |
m_Tooltip
Tooltip for the object creation button
Declaration
protected string m_Tooltip
Field Value
| Type | Description |
|---|---|
| String |
Properties
ButtonName
Name of the object being created
Declaration
public string ButtonName { get; }
Property Value
| Type | Description |
|---|---|
| String |
CreateInContextSelection
Scene context that the object will be created in
Declaration
public ObjectCreationButtonData.CreateInContext CreateInContextSelection { get; }
Property Value
| Type | Description |
|---|---|
| ObjectCreationButtonData.CreateInContext |
ObjectGUIContent
Object creation button GUI content
Declaration
public GUIContent ObjectGUIContent { get; }
Property Value
| Type | Description |
|---|---|
| GUIContent |
Methods
CreateGameObject()
Create a game object from the creation data
Declaration
public abstract bool CreateGameObject()
Returns
| Type | Description |
|---|---|
| Boolean |
|
CreationButtonContent()
Object creation button GUI content
Declaration
public GUIContent CreationButtonContent()
Returns
| Type | Description |
|---|---|
| GUIContent | Button GUI content |
GenerateInitialGameObject(String)
Create an empty game object with a unique name at the parent transform with world scale applied
Declaration
protected static GameObject GenerateInitialGameObject(string objName)
Parameters
| Type | Name | Description |
|---|---|---|
| String | objName | Name of the object to apply unique version |
Returns
| Type | Description |
|---|---|
| GameObject | Newly created game object |