Interface DefaultControls.IFactoryControls
Factory interface to create a GameObject in this class. It is necessary to use this interface in the whole class so MenuOption and Editor can work using ObjectFactory and default Presets.
Namespace: UnityEngine.UI
Assembly: UnityEngine.UI.dll
Syntax
public interface DefaultControls.IFactoryControls
Remarks
The only available method is CreateGameObject. It needs to be called with every Components the created Object will need because of a bug with Undo and RectTransform. Adding a UI component on the created GameObject may crash if done after Undo.SetTransformParent, So it's better to prevent such behavior in this class by asking for full creation with all the components.
Methods
CreateGameObject(string, params Type[])
Declaration
GameObject CreateGameObject(string name, params Type[] components)
Parameters
Type | Name | Description |
---|---|---|
string | name | |
Type[] | components |
Returns
Type | Description |
---|---|
GameObject |