Class AssetExtensions
Extension methods to simplify working with Unity assets
Inheritance
System.Object
AssetExtensions
Assembly: BlueprintCore.dll
Syntax
public static class AssetExtensions
Methods
|
Improve this Doc
View Source
AddComponent<T>(GameObject, Action<T>)
Declaration
public static T AddComponent<T>(this GameObject obj, Action<T> init)
where T : Component
Parameters
Type |
Name |
Description |
UnityEngine.GameObject |
obj |
|
System.Action<T> |
init |
|
Returns
Type Parameters
|
Improve this Doc
View Source
AnchorTo(GameObject, GameObject, Nullable<Vector3>, Nullable<Quaternion>)
Anchors to another object. When target
moves or rotates, obj
will as well.
Declaration
public static void AnchorTo(this GameObject obj, GameObject target, Vector3? offset = null, Quaternion? rotation = null)
Parameters
Type |
Name |
Description |
UnityEngine.GameObject |
obj |
|
UnityEngine.GameObject |
target |
|
System.Nullable<UnityEngine.Vector3> |
offset |
Offsets the anchor
|
System.Nullable<UnityEngine.Quaternion> |
rotation |
Rotates the object
|
|
Improve this Doc
View Source
AnchorToUnit(GameObject, UnitEntityData, Nullable<Vector3>, Nullable<Quaternion>)
Anchors to a unit. When unit
moves or rotates, obj
will as well.
Declaration
public static void AnchorToUnit(this GameObject obj, UnitEntityData unit, Vector3? offset = null, Quaternion? rotation = null)
Parameters
Type |
Name |
Description |
UnityEngine.GameObject |
obj |
|
Kingmaker.EntitySystem.Entities.UnitEntityData |
unit |
|
System.Nullable<UnityEngine.Vector3> |
offset |
Offsets the anchor
|
System.Nullable<UnityEngine.Quaternion> |
rotation |
Rotates the object
|
|
Improve this Doc
View Source
ChildObject(GameObject, String)
Declaration
public static GameObject ChildObject(this GameObject obj, string path)
Parameters
Type |
Name |
Description |
UnityEngine.GameObject |
obj |
|
System.String |
path |
|
Returns
Type |
Description |
UnityEngine.GameObject |
|
|
Improve this Doc
View Source
ChildObjects(GameObject, String[])
Declaration
public static List<GameObject> ChildObjects(this GameObject obj, params string[] paths)
Parameters
Type |
Name |
Description |
UnityEngine.GameObject |
obj |
|
System.String[] |
paths |
|
Returns
Type |
Description |
System.Collections.Generic.List<UnityEngine.GameObject> |
|
|
Improve this Doc
View Source
ChildTransform(GameObject, String)
Declaration
public static Transform ChildTransform(this GameObject obj, string path)
Parameters
Type |
Name |
Description |
UnityEngine.GameObject |
obj |
|
System.String |
path |
|
Returns
Type |
Description |
UnityEngine.Transform |
|
|
Improve this Doc
View Source
Copy(GameObject)
Declaration
public static GameObject Copy(this GameObject obj)
Parameters
Type |
Name |
Description |
UnityEngine.GameObject |
obj |
|
Returns
Type |
Description |
UnityEngine.GameObject |
|
|
Improve this Doc
View Source
DestroyChildren(GameObject, String[])
Declaration
public static void DestroyChildren(this GameObject obj, params string[] paths)
Parameters
Type |
Name |
Description |
UnityEngine.GameObject |
obj |
|
System.String[] |
paths |
|
|
Improve this Doc
View Source
DestroyChildrenImmediate(GameObject, String[])
Declaration
public static void DestroyChildrenImmediate(this GameObject obj, params string[] paths)
Parameters
Type |
Name |
Description |
UnityEngine.GameObject |
obj |
|
System.String[] |
paths |
|
|
Improve this Doc
View Source
DestroyComponents<T>(GameObject)
Declaration
public static void DestroyComponents<T>(this GameObject obj)
where T : Object
Parameters
Type |
Name |
Description |
UnityEngine.GameObject |
obj |
|
Type Parameters
|
Improve this Doc
View Source
EditComponent<T>(GameObject, Action<T>)
Declaration
public static T EditComponent<T>(this GameObject obj, Action<T> build)
where T : Component
Parameters
Type |
Name |
Description |
UnityEngine.GameObject |
obj |
|
System.Action<T> |
build |
|
Returns
Type Parameters