-
Notifications
You must be signed in to change notification settings - Fork 0
TPExtensionsPackage
Tomasz Piowczyk edited this page Sep 14, 2018
·
8 revisions
You can see core wiki THERE
public class TPEditorAttribute : PropertyAttribute { }
public class TPCallbackAttribute : TPEditorAttribute { public string CallbackName { get; } }
[AttributeUsage(AttributeTargets.Field, AllowMultiple = false, Inherited = true)]
public class InspectorReadOnlyAttribute(){}
[AttributeUsage(AttributeTargets.Field, AllowMultiple = false, Inherited = true)]
public class InspectorBackgroundAttribute(float r, float g, float b, float a = 1){}
[AttributeUsage(AttributeTargets.Field, AllowMultiple = false, Inherited = true)]
public class RequiredAttriubte(string message = null){}
[AttributeUsage(AttributeTargets.Field, AllowMultiple = false, Inherited = true)]
public class OnValueChangedAttribute(string callbackName){}
[AttributeUsage(AttributeTargets.Field, AllowMultiple = false, Inherited = true)]
public class InspectorValidateAttribute(string callbackName, string message = null){}
[AttributeUsage(AttributeTargets.Field, AllowMultiple = false, Inherited = true)]
public class ButtonAttriubte(string buttonName = null){}
// boolStatementsString can be public/private/serializable:
// - Method that returns bool or UnityEngine.Object,
// - Variable that returns bool or UnityEngine.Object,
// You can put multiple conditions splitted with ',' character - treated as "AND"
// Examples:
// [SerializeField] private bool myBool, myOtherBool
// private bool GetBool() => myOtherBool && myBool
// [InspectorHide("GetBool")] private int integer; // will be drawed when myBool and myOther are true
// [InspectorHide("myBool, myOtherBool")] private string text; // will be drawed when myBool AND myOther
[AttributeUsage(AttributeTargets.Field, Inherited = true)]
public class InspectorHideAttribute(string boolStatementsString, bool disableOnly = false){}public static GameObject FindObjectWithLayer(this Object obj, int layer){}public static void SetSprite(this Image image, Sprite sprite){}
public static void SetFill(this Image image, float fillAmount){}
public static void SetAlpha(this Image image, float alpha){}
public static void SetValue(this Slider slider, float value){}
public static bool IsInside(this Rect thisRect, Rect rect){}
public static void ClampToWindow(this RectTransform panelRectTransform, RectTransform parentRectTransform){}/// resolutionText should be formatted as: "320 x 200 @ 60Hz" or "320 x 200"
public static Resolution ToResolution(this string resolutionText){}
public static string ToStringWithoutHZ(this Resolution resolution){}
public static string[] ToStringWithoutHZ(this Resolution[] resolutions){}
public static string[] ToStringWithHZ(this Resolution[] resolutions){}public static bool IsFrame(this int frameModulo){}
public static void ToLog(this object obj, string label = null){}
public static void AllToLog(this object[] objs, string label = null){}
public static float GetFloat(this AudioMixer audioMixer, string paramName){}public static T[] GetComponentsOnlyInChildren<T>(this GameObject gameObject){}
public static T GetComponentOnlyInChildren<T>(this GameObject gameObject){}
public static void DestroyChildren(this Transform transform){}
public static void SetPosX(this Transform transform, float x){}
public static void SetPosY(this Transform transform, float y){}
public static void SetPosZ(this Transform transform, float z){}
public static Vector3[] GetChildrenPositions(this Transform parent){}
public static Transform[] GetChilds(this Transform parent){}public static Vector3[] SequenceSquarePositions(int width, int height){}
public static Vector3[] SequenceBoxPositions(int width, int height, int layers){}
public static Vector3 Set(this Vector3 vector, float equal){}
public static Vector3 Set(this Vector2 vector, float equal){}
public static Vector3 Add(this Vector3 vector, float addition){}
public static Vector2 Add(this Vector2 vector, float addition){}
public static Vector3 Subtraction(this Vector3 vector, float subtraction){}
public static Vector2 Subtraction(this Vector2 vector, float subtraction){}
public static bool IsGreaterEqualThan(this Vector2 vector, Vector3 equalVector){}
public static bool IsGreaterEqualThan(this Vector3 vector, Vector2 equalVector){}
public static bool IsGreaterEqualThan(this Vector3 vector, Vector3 equalVector){}
public static bool IsLessEqualThan(this Vector2 vector, Vector3 equalVector){}
public static bool IsLessEqualThan(this Vector3 vector, Vector2 equalVector){}
public static bool IsLessEqualThan(this Vector3 vector, Vector3 equalVector){}
public static bool IsLessThan(this Vector2 vector, Vector3 equalVector){}
public static bool IsLessThan(this Vector2 vector, Vector3 equalVector){}
public static bool IsLessThan(this Vector3 vector, Vector2 equalVector){}
public static bool IsLessThan(this Vector3 vector, Vector3 equalVector){}
public static bool IsGreaterThan(this Vector2 vector, Vector3 equalVector){}
public static bool IsGreaterThan(this Vector3 vector, Vector2 equalVector){}
public static bool IsGreaterThan(this Vector3 vector, Vector3 equalVector){}
public static bool IsEqualTo(this Vector2 vector, Vector3 equalVector){}
public static bool IsEqualTo(this Vector3 vector, Vector2 equalVector){}
public static bool IsEqualTo(this Vector3 vector, Vector3 equalVector){}public static object GetTargetObject(this SerializedProperty prop){}
public static bool HasAnyElementSameValue(this SerializedProperty array, SerializedProperty key1, int skipIndex, Type castType = null){}
public static object GetValue(this SerializedProperty prop){}This is extended documentation of TPFramework.Core, for core functionallity see THIS