当前位置:网站首页>Unity skframework framework (XIV), extension extension function
Unity skframework framework (XIV), extension extension function
2022-07-02 13:07:00 【CoderZ1010】
Catalog
brief introduction
This part is used in the framework this Keyword extension function for some types , In order to support chain programming or recording 、 Package some functions , The content will continue to be supplemented , This article gives some examples .

One 、DotNet
Array
/// <summary>
/// Traverse
/// </summary>
/// <param name="action"> Traversal Events </param>
public static T[] ForEach<T>(this T[] self, Action<int, T> action);
/// <summary>
/// Reverse traversal
/// </summary>
/// <param name="action"> Traversal Events </param>
public static T[] ForEachReverse<T>(this T[] self, Action<T> action);
/// <summary>
/// Reverse traversal
/// </summary>
/// <param name="action"> Traversal Events </param>
public static T[] ForEachReverse<T>(this T[] self, Action<int, T> action);
/// <summary>
/// Merge
/// </summary>
/// <param name="target"> The goal of the merger </param>
/// <returns> Back to a new Array Contains the merged two Array All elements in </returns>
public static T[] Merge<T>(this T[] self, T[] target);
/// <summary>
/// Insertion sort
/// </summary>
/// <returns> Return sorted array </returns>
public static int[] SortInsertion(this int[] self);
/// <summary>
/// Shell Sort
/// </summary>
/// <returns> Return sorted array </returns>
public static int[] SortShell(this int[] self);
/// <summary>
/// Selection sort
/// </summary>
/// <returns> Return sorted array </returns>
public static int[] SortSelection(this int[] self);
/// <summary>
/// Bubble sort
/// </summary>
/// <returns> Return sorted array </returns>
public static int[] SortBubble(this int[] self);Example
using UnityEngine;
using SK.Framework;
public class Example : MonoBehaviour
{
private void Start()
{
string[] exampleArray = new string[] { "AAA", "BBB" };
// Traverse
exampleArray.ForEach((i, s) => Debug.Log(string.Format("{0}.{1}", i + 1, s)));
// Reverse traversal
exampleArray.ForEachReverse(m => Debug.Log(m));
// Reverse traversal
exampleArray.ForEachReverse((i, s) => Debug.Log(string.Format("{0}.{1}", i + 1, s)));
//Array Merge
string[] target = new string[] { "CCC", "DDD" };
string[] merge = exampleArray.Merge(target);
int[] intArray = new int[] { 55, 32, 57, 89, 13, 87 , 9, 21};
// Shell Sort
intArray.SortInsertion();
// Selection sort
intArray.SortSelection();
// Bubble sort
intArray.SortBubble();
}
}bool
/// <summary>
/// If bool The value is true Then execute the event
/// </summary>
/// <param name="action"> event </param>
public static bool Execute(this bool self, Action action);
/// <summary>
/// according to bool Value execution Action<bool> Type of event
/// </summary>
/// <param name="action"> event </param>
public static bool Execute(this bool self, Action<bool> action);
/// <summary>
/// bool The value is true Then execute the first event Otherwise, execute the second event
/// </summary>
public static bool Execute(this bool self, Action actionIfTrue, Action actionIfFalse);
/// <summary>
/// bool Value reversal
/// </summary>
public static bool Reverse(this bool self);Example
using UnityEngine;
using SK.Framework;
public class Example : MonoBehaviour
{
private bool flag;
private void Start()
{
// If flag by true The log will be printed true
flag.Execute(() => Debug.Log("true"));
// If flag by true The log will be printed true Otherwise print the log false
flag.Execute(isTrue => Debug.Log(isTrue));
// If flag by true The log will be printed true Otherwise print the log false
flag.Execute(() => Debug.Log("true"), () => Debug.Log("false"));
}
}Class
/// <summary>
/// If the object is not null Then execute the event
/// </summary>
/// <param name="action"> event </param>
/// <returns> Execution successful return true Otherwise return to false</returns>
public static bool Execute<T>(this T self, Action<T> action);Example
using UnityEngine;
using SK.Framework;
public class Example : MonoBehaviour
{
public class Person
{
public string name;
}
private Person person;
private void Start()
{
person.Execute(m => Debug.Log(m.name));
}
}DateTime
/// <summary>
/// Get the timestamp
/// </summary>
/// <returns> Time stamp </returns>
public static double GetTimeStamp(this DateTime self);
/// <summary>
/// Convert to Chinese
/// </summary>
/// <param name="prefix"> Prefix Zhou / week </param>
/// <returns> Chinese string </returns>
public static string ToChinese(this DayOfWeek self, string prefix);Example
using System;
using UnityEngine;
using SK.Framework;
public class Example : MonoBehaviour
{
private void Start()
{
DateTime now = DateTime.Now;
// Get the timestamp
double timeStamp = now.GetTimeStamp();
DayOfWeek day = DayOfWeek.Monday;
// Translate into Chinese Monday
string chinese = day.ToChinese(" Zhou ");
// Translate into Chinese Monday
chinese = day.ToChinese(" week ");
}
}Dictionary
/// <summary>
/// Copy the dictionary
/// </summary>
public static Dictionary<K, V> Copy<K, V>(this Dictionary<K, V> self);
/// <summary>
/// Ergodic dictionary
/// </summary>
/// <param name="action"> Traversal Events </param>
public static Dictionary<K, V> ForEach<K, V>(this Dictionary<K, V> self, Action<K, V> action);
/// <summary>
/// Merge dictionaries
/// </summary>
/// <param name="target"> Merged dictionary </param>
/// <param name="isOverride"> If the same key exists , Whether to overwrite the corresponding value </param>
/// <returns> The merged dictionary </returns>
public static Dictionary<K, V> AddRange<K, V>(this Dictionary<K, V> self, Dictionary<K, V> target, bool isOverride = false);
/// <summary>
/// Put all the values of the dictionary into a list
/// </summary>
/// <returns> list </returns>
public static List<V> Value2List<K, V>(this Dictionary<K, V> self);
/// <summary>
/// Put all the values of the dictionary into an array
/// </summary>
/// <returns> Array </returns>
public static V[] Value2Array<K, V>(this Dictionary<K, V> self);
/// <summary>
/// Try to add
/// </summary>
/// <param name="k"> key </param>
/// <param name="v"> value </param>
/// <returns> If the same key does not exist , Add successfully and return true, Otherwise return to false</returns>
public static bool TryAdd<K, V>(this Dictionary<K, V> self, K k, V v);Example
using UnityEngine;
using SK.Framework;
using System.Collections.Generic;
public class Example : MonoBehaviour
{
private void Start()
{
Dictionary<int, string> dic = new Dictionary<int, string>() { { 5, "AAA" }, { 10, "BBB" } };
// Copy the dictionary
Dictionary<int, string> copy = dic.Copy();
// Ergodic dictionary
dic.ForEach(m => Debug.Log(string.Format("Key{0} Value{1}", m.Key, m.Value)));
Dictionary<int, string> target = new Dictionary<int, string>() { { 11, "CCC" }, { 20, "DDD" } };
// Merge dictionaries
dic.AddRange(target);
// Put all the values of the dictionary into a list
List<string> list = dic.Value2List();
// Put all the values of the dictionary into one Array in
string[] array = dic.Value2Array();
// Try to add
if (dic.TryAdd(20, "DDD")) Debug.Log(" Add success ");
}
}int
/// <summary>
/// Into letters (1-26 For letters A-Z)
/// </summary>
/// <returns> Alphabetic character </returns>
public static char ToLetter(this int self);
/// <summary>
/// Factorial
/// </summary>
/// <returns> Factorial result </returns>
public static int Fact(this int self);Example
using UnityEngine;
using SK.Framework;
public class Example : MonoBehaviour
{
private void Start()
{
// Into letters => B
char letter = 2.ToLetter();
// Factorial => 5 * 4 * 3 * 2 * 1
int fact = 5.Fact();
}
}List
/// <summary>
/// Traverse
/// </summary>
/// <param name="action"> Traversal Events </param>
public static List<T> ForEach<T>(this List<T> self, Action<T> action);
/// <summary>
/// Traverse
/// </summary>
/// <param name="action"> Traversal Events </param>
public static List<T> ForEach<T>(this List<T> self, Action<int, T> action);
/// <summary>
/// Reverse traversal
/// </summary>
/// <param name="action"> Traversal Events </param>
public static List<T> ForEachReverse<T>(this List<T> self, Action<T> action);
/// <summary>
/// Reverse traversal
/// </summary>
/// <param name="action"> Traversal Events </param>
public static List<T> ForEachReverse<T>(this List<T> self, Action<int, T> action);
/// <summary>
/// Copy
/// </summary>
/// <returns> Return a new list with the same elements </returns>
public static List<T> Copy<T>(this List<T> self);
/// <summary>
/// Try to add
/// </summary>
/// <param name="t"> Added target </param>
/// <returns> Add successfully, return true Otherwise return to false</returns>
public static bool TryAdd<T>(this List<T> self, T t);Example
using UnityEngine;
using SK.Framework;
using System.Collections.Generic;
public class Example : MonoBehaviour
{
private void Start()
{
List<string> list = new List<string>() { "AAA", "BBB" };
// Traverse
list.ForEach(m => Debug.Log(m));
// Traverse
list.ForEach((i, m) => Debug.Log(string.Format("{0}.{1}", i + 1, m)));
// Reverse traversal
list.ForEachReverse(m => Debug.Log(m));
// Reverse traversal
list.ForEachReverse((i, m) => Debug.Log(string.Format("{0}.{1}", i + 1, m)));
// Copy of the list
List<string> copy = list.Copy();
// Try to add
if (list.TryAdd("CCC")) Debug.Log(" Add success ");
}
}Queue
/// <summary>
/// Traverse
/// </summary>
/// <param name="action"> Traversal Events </param>
public static Queue<T> ForEach<T>(this Queue<T> self, Action<T> action);
/// <summary>
/// Merge The elements in the target queue will be listed and merged in turn
/// </summary>
/// <param name="target"> The goal of the merger </param>
public static Queue<T> Merge<T>(this Queue<T> self, Queue<T> target);
/// <summary>
/// Copy
/// </summary>
/// <returns> Return a new queue containing the same elements </returns>
public static Queue<T> Copy<T>(this Queue<T> self);Example
using UnityEngine;
using SK.Framework;
using System.Collections.Generic;
public class Example : MonoBehaviour
{
private void Start()
{
Queue<string> queue = new Queue<string>();
// Traverse the queue
queue.ForEach(m => Debug.Log(m));
Queue<string> target = new Queue<string>();
// Merge queues
queue.Merge(target);
// Copy queue
Queue<string> copy = queue.Copy();
}
}Stack
/// <summary>
/// Traverse
/// </summary>
/// <param name="action"> Traversal Events </param>
public static Stack<T> ForEach<T>(this Stack<T> self, Action<T> action);Example
using UnityEngine;
using SK.Framework;
using System.Collections.Generic;
public class Example : MonoBehaviour
{
private void Start()
{
Stack<string> stack = new Stack<string>();
// Traverse
stack.ForEach(m => Debug.Log(m));
}
}string
/// <summary>
/// Count the number of times the target character appears in the string Case insensitive
/// </summary>
/// <param name="target"> Target character </param>
/// <returns> frequency </returns>
public static int CharCount(this string self, char target);
/// <summary>
/// Try to convert to enumeration
/// </summary>
/// <typeparam name="T"> Enumeration type </typeparam>
/// <returns> Conversion results </returns>
public static T ToEnum<T>(this string self);
/// <summary>
/// Try to convert to enumeration
/// </summary>
/// <typeparam name="T"> Enumeration type </typeparam>
/// <param name="ignoreCase"> Ignore case </param>
/// <returns> Conversion results </returns>
public static T ToEnum<T>(this string self, bool ignoreCase);
/// <summary>
/// title case
/// </summary>
/// <returns> character string </returns>
public static string UppercaseFirst(this string self);
/// <summary>
/// Judge whether the file exists
/// </summary>
/// <returns> Whether there is </returns>
public static bool FileExists(this string self);
/// <summary>
/// Delete files by path
/// </summary>
/// <returns> Delete result </returns>
public static bool DeleteFile(this string self);
/// <summary>
/// Determine whether the folder exists
/// </summary>
/// <returns> Whether there is </returns>
public static bool DirectoryExists(this string self);
/// <summary>
/// Create a folder based on the path
/// </summary>
/// <returns> Folder path </returns>
public static string CreateDirectory(this string self);
/// <summary>
/// Delete the folder according to the path
/// </summary>
/// <returns> Delete result </returns>
public static bool DeleteDirectory(this string self);
/// <summary>
/// Merge path
/// </summary>
/// <param name="beCombined"> Merged path </param>
/// <returns> Merged path </returns>
public static string PathCombine(this string self, string beCombined);
/// <summary>
/// Turn into base64 character string
/// </summary>
/// <returns>base64 character string </returns>
public static string ToBase64String(this string self);
/// <summary>
/// Determine whether the string contains Chinese
/// </summary>
/// <param name="self"> character string </param>
/// <returns> If the string contains Chinese, return true, Otherwise return to false</returns>
public static bool IsContainChinese(this string self);
/// <summary>
/// Determine if the string is 16 Hexadecimal data
/// </summary>
/// <returns> If the string matches 16 Hexadecimal data format returns true, Otherwise return to false</returns>
public static bool IsMatchHexadecimal(this string self);
/// <summary>
/// Determine if the string is url
/// </summary>
/// <returns> If the string matches url Address format returns true, Otherwise return to false</returns>
public static bool IsMatchURL(this string self);
/// <summary>
/// Determine if the string is IP Address
/// </summary>
/// <returns> If the string matches IP Address format returns true, Otherwise return to false</returns>
public static bool IsMatchIPAddress(this string self);
/// <summary>
/// Determine if the string is Email mailbox
/// </summary>
/// <returns> If the string matches Email Email format returns true, Otherwise return to false</returns>
public static bool IsMatchEmail(this string self);
/// <summary>
/// Judge whether the string is a mobile number
/// </summary>
/// <returns> If the string conforms to the format of mobile phone number, return true, Otherwise return to false</returns>
public static bool IsMatchMobilePhoneNumber(this string self);Example
using UnityEngine;
using SK.Framework;
public class Example : MonoBehaviour
{
private void Start()
{
string str = "ABcaD";
// character a The number of occurrences in the string => 2
int count = str.CharCount('a');
// String to enumeration
KeyCode a = "a".ToEnum<KeyCode>(true);
// title case => CoderZ
string fuc = "coderZ".UppercaseFirst();
string path = Application.dataPath + "/SKFramework/Cube.prefab";
// Judge whether the file exists
bool fileExists = path.FileExists();
// Delete files by path
path.DeleteFile();
path = Application.dataPath + "/SKFramework";
// Does the folder exist
bool dirExists = path.DirectoryExists();
// Create a folder based on the path
path.CreateDirectory();
// Delete the folder according to the path
path.DeleteDirectory();
// Path merging
Application.dataPath.PathCombine("SKFramework");
// Turn into Base64 character string
string base64 = str.ToBase64String();
// Whether the string contains Chinese
str.IsContainChinese();
// Is the string 16 Hexadecimal data
str.IsMatchHexadecimal();
// Is the string url link
str.IsMatchURL();
// Is the string ip Address
str.IsMatchIPAddress();
// Is the string Eamil mailbox
str.IsMatchEmail();
// Whether the string is a mobile number
str.IsMatchMobilePhoneNumber();
}
}Two 、Unity
AudioSource
public static AudioSource SetClip(this AudioSource source, AudioClip clip);
public static AudioSource SetPitch(this AudioSource source, float pitch);
public static AudioSource SetPriority(this AudioSource source, int priority);
public static AudioSource SetLoop(this AudioSource source, bool loop);
public static AudioSource SetPlayOnAwake(this AudioSource source, bool playOnAwake);
public static AudioSource SetVolume(this AudioSource source, float volume);
public static AudioSource SetPanStereo(this AudioSource source, float panStereo);
public static AudioSource SetSpatialBlend(this AudioSource source, float spatialBlend);
public static AudioSource Play(this AudioSource source, AudioClip clip);Example
using UnityEngine;
using SK.Framework;
public class Example : MonoBehaviour
{
private void Start()
{
new GameObject().AddComponent<AudioSource>()
.SetClip(null)
.SetVolume(.5f)
.SetPitch(1f)
.SetLoop(true)
.SetPlayOnAwake(false)
.SetPanStereo(0)
.SetSpatialBlend(0)
.SetPriority(128)
.Play();
}
}Transform
public static T SetSiblingIndex<T>(this T self, int index) where T : Component;
public static T SetAsFirstSibling<T>(this T self) where T : Component;
public static T SetAsLastSibling<T>(this T self) where T : Component;
public static T GetSiblingIndex<T>(this T self, out int index) where T : Component;
public static T GetPosition<T>(this T self, out Vector3 position) where T : Component;
public static T SetPosition<T>(this T self, Vector3 pos) where T : Component;
public static T SetPosition<T>(this T self, float x, float y, float z) where T : Component;
public static T SetPositionX<T>(this T self, float x) where T : Component;
public static T SetPositionY<T>(this T self, float y) where T : Component;
public static T SetPositionZ<T>(this T self, float z) where T : Component;
public static T PositionIdentity<T>(this T self) where T : Component;
public static T RotationIdentity<T>(this T self) where T : Component;
public static T SetEulerAngles<T>(this T self, Vector3 eulerAngles) where T : Component;
public static T SetEulerAngles<T>(this T self, float x, float y, float z) where T : Component;
public static T SetEulerAnglesX<T>(this T self, float x) where T : Component;
public static T SetEulerAnglesY<T>(this T self, float y) where T : Component;
public static T SetEulerAnglesZ<T>(this T self, float z) where T : Component;
public static T EulerAnglesIdentity<T>(this T self) where T : Component;
public static T SetLocalPosition<T>(this T self, Vector3 localPos) where T : Component;
public static T SetLocalPosition<T>(this T self, float x, float y, float z) where T : Component;
public static T SetLocalPositionX<T>(this T self, float x) where T : Component;
public static T SetLocalPositionY<T>(this T self, float y) where T : Component;
public static T SetLocalPositionZ<T>(this T self, float z) where T : Component;
public static T LocalPositionIdentity<T>(this T self) where T : Component;
public static T LocalRotationIdentity<T>(this T self) where T : Component;
public static T SetLocalEulerAngles<T>(this T self, Vector3 localEulerAngles) where T : Component;
public static T SetLocalEulerAngles<T>(this T self, float x, float y, float z) where T : Component;
public static T SetLocalEulerAnglesX<T>(this T self, float x) where T : Component;
public static T SetLocalEulerAnglesY<T>(this T self, float y) where T : Component;
public static T SetLocalEulerAnglesZ<T>(this T self, float z) where T : Component;
public static T LocalEulerAnglesIdentity<T>(this T self) where T : Component;
public static T SetLocalScale<T>(this T self, Vector3 localScale) where T : Component;
public static T SetLocalScale<T>(this T self, float x, float y, float z) where T : Component;
public static T SetLocalScaleX<T>(this T self, float x) where T : Component;
public static T SetLocalScaleY<T>(this T self, float y) where T : Component;
public static T SetLocalScaleZ<T>(this T self, float z) where T : Component;
public static T LocalScaleIdentity<T>(this T self) where T : Component;
public static T Identity<T>(this T self) where T : Component;
public static T LocalIdentity<T>(this T self) where T : Component;
public static T SetParent<T>(this T self, Component parent, bool worldPositionStays = true) where T : Component;
public static T SetAsRootTransform<T>(this T self) where T : Component;
public static T DetachChildren<T>(this T self) where T : Component;
public static T LookAt<T>(this T self, Vector3 worldPosition) where T : Component;
public static T LookAt<T>(this T self, Vector3 worldPosition, Vector3 worldUp) where T : Component;
public static T LookAt<T>(this T self, Transform target) where T : Component;
public static T LookAt<T>(this T self, Transform target, Vector3 worldUp) where T : Component;
public static T Rotate<T>(this T self, Vector3 eulers) where T : Component;
public static T Rotate<T>(this T self, Vector3 eulers, Space relativeTo) where T : Component;
public static T Rotate<T>(this T self, Vector3 axis, float angle) where T : Component;
public static T Rotate<T>(this T self, Vector3 axis, float angle, Space relativeTo) where T : Component;
public static T Rotate<T>(this T self, float xAngle, float yAngle, float zAngle) where T : Component;
public static T Rotate<T>(this T self, float xAngle, float yAngle, float zAngle, Space relativeTo) where T : Component;
public static T CopyTransformValues<T>(this T self, Component target) where T : Component;
public static T GetFullName<T>(this T self, out string fullName) where T : Component;
public static T GetComponentOnChild<T>(this Transform self, int childIndex) where T : Component;Example
using UnityEngine;
using SK.Framework;
public class Example : MonoBehaviour
{
private void Start()
{
new GameObject().transform
.SetPositionX(0f)
.SetPositionY(0f)
.SetPositionZ(0f)
.SetPosition(Vector3.zero)
.SetPosition(0f, 0f, 0f)
.PositionIdentity()
.SetEulerAnglesX(0f)
.SetEulerAnglesY(0f)
.SetEulerAnglesZ(0f)
.SetEulerAngles(Vector3.zero)
.SetEulerAngles(0f, 0f, 0f)
.EulerAnglesIdentity()
.SetLocalScaleX(1f)
.SetLocalScaleY(1f)
.SetLocalScaleZ(1f)
.SetLocalScale(Vector3.one)
.SetLocalScale(1f, 1f, 1f)
.LocalIdentity()
.Identity()
.LocalIdentity();
}
}RectTransform
public static RectTransform SetAnchoredPosition(this RectTransform self, Vector2 anchoredPosition);
public static RectTransform SetAnchoredPosition(this RectTransform self, float x, float y);
public static RectTransform SetAnchoredPositionX(this RectTransform self, float x);
public static RectTransform SetAnchoredPositionY(this RectTransform self, float y);
public static RectTransform SetOffsetMax(this RectTransform self, Vector2 offsetMax);
public static RectTransform SetOffsetMax(this RectTransform self, float x, float y);
public static RectTransform SetOffsetMaxX(this RectTransform self, float x);
public static RectTransform SetOffsetMaxY(this RectTransform self, float y);
public static RectTransform SetOffsetMin(this RectTransform self, Vector2 offsetMin);
public static RectTransform SetOffsetMin(this RectTransform self, float x, float y);
public static RectTransform SetOffsetMinX(this RectTransform self, float x);
public static RectTransform SetOffsetMinY(this RectTransform self, float y);
public static RectTransform SetAnchoredPosition3D(this RectTransform self, Vector3 anchoredPosition3D);
public static RectTransform SetAnchoredPosition3D(this RectTransform self, float x, float y);
public static RectTransform SetAnchoredPosition3DX(this RectTransform self, float x);
public static RectTransform SetAnchoredPosition3DY(this RectTransform self, float y);
public static RectTransform SetAnchorMin(this RectTransform self, Vector2 anchorMin);
public static RectTransform SetAnchorMin(this RectTransform self, float x, float y);
public static RectTransform SetAnchorMinX(this RectTransform self, float x);
public static RectTransform SetAnchorMinY(this RectTransform self, float y);
public static RectTransform SetAnchorMax(this RectTransform self, Vector2 anchorMax);
public static RectTransform SetAnchorMax(this RectTransform self, float x, float y);
public static RectTransform SetAnchorMaxX(this RectTransform self, float x);
public static RectTransform SetAnchorMaxY(this RectTransform self, float y);
public static RectTransform SetPivot(this RectTransform self, Vector2 pivot);
public static RectTransform SetPivot(this RectTransform self, float x, float y);
public static RectTransform SetPivotX(this RectTransform self, float x);
public static RectTransform SetPivotY(this RectTransform self, float y);
public static RectTransform SetSizeDelta(this RectTransform self, Vector2 sizeDelta);
public static RectTransform SetSizeDelta(this RectTransform self, float x, float y);
public static RectTransform SetSizeDeltaX(this RectTransform self, float x);
public static RectTransform SetSizeDeltaY(this RectTransform self, float y);
public static RectTransform SetWidthWithCurrentAnchors(this RectTransform self, float width);
public static RectTransform SetHeightWithCurrentAnchors(this RectTransform self, float height);Example
using UnityEngine;
using SK.Framework;
public class Example : MonoBehaviour
{
private void Start()
{
GetComponent<RectTransform>()
.SetAnchoredPositionX(0f)
.SetAnchoredPositionY(0f)
.SetAnchoredPosition(0f, 0f)
.SetAnchoredPosition(Vector2.zero)
.SetOffsetMaxX(0f)
.SetOffsetMaxY(0f)
.SetOffsetMax(0f, 0f)
.SetOffsetMax(Vector2.zero)
.SetOffsetMinX(0f)
.SetOffsetMinY(0f)
.SetOffsetMin(0f, 0f)
.SetOffsetMin(Vector2.zero)
.SetAnchoredPosition3DX(0f)
.SetAnchoredPosition3DY(0f)
.SetAnchoredPosition3D(0f, 0f)
.SetAnchoredPosition(Vector2.zero)
.SetAnchorMinX(0f)
.SetAnchorMinY(0f)
.SetAnchorMin(0f, 0f)
.SetAnchorMin(Vector2.zero)
.SetAnchorMaxX(0f)
.SetAnchorMaxY(0f)
.SetAnchorMax(0f, 0f)
.SetAnchorMax(Vector2.zero)
.SetPivotX(0f)
.SetPivotY(0f)
.SetPivot(0f, 0f)
.SetPivot(Vector2.zero)
.SetSizeDeltaX(0f)
.SetSizeDeltaY(0f)
.SetSizeDelta(0f, 0f)
.SetSizeDelta(Vector2.zero)
.SetWidthWithCurrentAnchors(0f)
.SetHeightWithCurrentAnchors(0f);
}
}边栏推荐
- js3day(数组操作,js冒泡排序,函数,调试窗口,作用域及作用域链,匿名函数,对象,Math对象)
- js1day(輸入輸出語法,數據類型,數據類型轉換,var和let區別)
- C operator
- Domestic free data warehouse ETL dispatching automation operation and maintenance expert taskctl
- 8A 同步降压稳压器 TPS568230RJER_规格信息
- [opencv learning] [moving object detection]
- [opencv learning] [image histogram and equalization]
- Jerry's watch reads the alarm clock [chapter]
- 百款拿来就能用的网页特效,不来看看吗?
- Everyone wants to eat a broken buffet. It's almost cold
猜你喜欢

应用LNK306GN-TL 转换器、非隔离电源

(6) Web security | penetration test | network security encryption and decryption ciphertext related features, with super encryption and decryption software

Js1day (syntaxe d'entrée / sortie, type de données, conversion de type de données, Var et let différenciés)

Ltc3307ahv meets EMI standard, step-down converter qca7005-al33 phy

阿里初面被两道编程题给干掉,再次内推终上岸(已拿电子offer)

C operator

模数转换器(ADC) ADE7913ARIZ 专为三相电能计量应用而设计

Modular commonjs es module

Js8day (rolling event (scroll family), offset family, client family, carousel map case (to be done))
![[opencv learning] [image filtering]](/img/4c/fe22e9cdf531873a04a7c4e266228d.jpg)
[opencv learning] [image filtering]
随机推荐
传感器 ADXL335BCPZ-RL7 3轴 加速度计 符合 RoHS/WEEE
日本赌国运:Web3.0 ,反正也不是第一次失败了!
3 a VTT terminal regulator ncp51200mntxg data
Js8day (rolling event (scroll family), offset family, client family, carousel map case (to be done))
. Net, C # basic knowledge
Unforgettable Ali, 4 skills, 5 hr additional written tests, it's really difficult and sad to walk
Rust language document Lite (Part 1) - cargo, output, basic syntax, data type, ownership, structure, enumeration and pattern matching
Rust语言文档精简版(上)——cargo、输出、基础语法、数据类型、所有权、结构体、枚举和模式匹配
ADB basic commands
Window10 upgrade encountered a big hole error code: 0xc000000e perfect solution
JS8day(滚动事件(scroll家族),offset家族,client家族,轮播图案例(待做))
Jerry's watch delete alarm clock [chapter]
Some sudden program ideas (modular processing)
How can attribute mapping of entity classes be without it?
Wechat official account payment prompt MCH_ ID parameter format error
Js1day (syntaxe d'entrée / sortie, type de données, conversion de type de données, Var et let différenciés)
Hash table acwing 840 Simulated hash table
js5day(事件监听,函数赋值给变量,回调函数,环境对象this,全选反选案例,tab栏案例)
Redis bloom filter
Efficiency comparison between ArrayList and LinkedList