Class ObjectCreationButtonData
(Obsolete) Used to create a game object in the editor and with a button
Inherited Members
Namespace: Unity.MARS
Syntax
[Serializable]
[Obsolete("Unity.MARS.ObjectCreationButtonData has been deprecated. Use UnityEditor.MARS.ObjectCreationData instead (UnityUpgradable) -> UnityEditor.MARS.ObjectCreationData", false)]
public abstract class ObjectCreationButtonData : ScriptableObject
Fields
m_ButtonName
Name of the object being created
Declaration
[SerializeField]
[Tooltip("Name of the object being created")]
protected string m_ButtonName
Field Value
Type | Description |
---|---|
String |
m_Icon
Icon used for the object creation button
Declaration
[SerializeField]
[Tooltip("Icon used for the object creation button")]
protected DarkLightIconPair m_Icon
Field Value
Type | Description |
---|---|
DarkLightIconPair |
m_Tooltip
Tooltip for the object creation button
Declaration
[SerializeField]
[Tooltip("Tooltip for the object creation button")]
protected string m_Tooltip
Field Value
Type | Description |
---|---|
String |
Properties
ButtonName
Name of the object being created
Declaration
[Obsolete("ButtonName has been deprecated. Use ObjectName property instead (UnityUpgradable) -> ObjectName", false)]
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
[Obsolete("CreateGameObject() has been deprecated, please use CreateGameObject(out GameObject createdObject, Transform parentTransform) instead", false)]
public abstract bool CreateGameObject()
Returns
Type | Description |
---|---|
Boolean |
|
CreationButtonContent()
Object creation button GUI content
Declaration
[Obsolete("CreationButtonContent() has been deprecated.", false)]
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
[Obsolete("GenerateInitialGameObject(string objName) has been deprecated, please use GenerateInitialGameObject(string objName, Transform parent)", false)]
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 |