unity源码解析Transform

更新时间:2023-06-17 11:25:40 阅读: 评论:0

unity源码解析Transform
Transform这个类继承⾃Component, IEnumerable。我们在开发的过程中之所以可以对Transform进⾏foreach,就是因为它实现了IEnumerable抽象⽅法GetEnumerator,该⽅法返回⼀个IEnumerator,⽽通过重写了IEnumerator中的Current,可以依次获得⼦对象。废话不多说了
using System;
using System.Collections;
using System.Runtime.CompilerServices;
using UnityEngine.Internal;
namespace UnityEngine
{
public class Transform : Component, IEnumerable
{
private aled class Enumerator : IEnumerator
{
private Transform outer;
private int currentIndex = -1;
public object Current
{
get
{
this.currentIndex);
return this
this.outer.GetChild(this
}
}
internal Enumerator(Transform outer)
{
this.outer = outer;
this
}
public bool MoveNext()
{
int childCount =this
this.outer.childCount;
this.currentIndex < childCount;
return ++this
}
public void Ret()
{
this
this.currentIndex = -1;
}
}
public Vector3 position
{
get
{
Vector3 result;
this.INTERNAL_get_position(out result);
this
return result;
}
t
{
value);
this
this.INTERNAL_t_position(ref value
this this.INTERNAL_t_position (ref value
value);            }
}
public  Vector3 localPosition
{
get
{
Vector3 result;
this this.INTERNAL_get_localPosition (out  result);
return  result;
}
t
{
this this.INTERNAL_t_localPosition (ref value
value);            }
}
public  Vector3 eulerAngles
{
get
{
return  ation.eulerAngles;
}
t
{
ation = Quaternion.Euler (value value);
}
}
public  Vector3 localEulerAngles
{
get
{hooters
Vector3 result;
this this.INTERNAL_get_localEulerAngles (out  result);
return  result;
}
t
{
this this.INTERNAL_t_localEulerAngles (ref value
value);            }
}
public  Vector3 right
{
get
{
return  ation * Vector3.right;
}
t
{
ation = Quaternion.FromToRotation (Vector3.right,value value);
}
}
public Vector3 up
{
get
{
return this
}
t
{
value);                this
}
}
public Vector3 forward
{
get
{
return this
}
t
{
value);
this
}
}
swlpublic Quaternion rotation
{
get
{
Quaternion result;
this.INTERNAL_get_rotation(out result);
this
return result;
}
t
{
value);
this
this.INTERNAL_t_rotation(ref value
}
}
public Quaternion localRotation
{
get
{
Quaternion result;
this.INTERNAL_get_localRotation(out result);
this
return result;
}
t
{
value);
this
this.INTERNAL_t_localRotation(ref value
}
}
public Vector3 localScale
{
get
get
马如游龙{
Vector3 result;
this
this.INTERNAL_get_localScale(out result);
return result;
}
t
{
value);
this.INTERNAL_t_localScale(ref value
this
}
}
public Transform parent
{
get
{
this.parentInternal;
return this
}
t
{
if (this
this is RectTransform)
{
Debug.LogWarning("Parent of RectTransform is being t with parent property. Consider using the SetParent method instead, with the worldPositionStays argument t to fal. This will retain local orientation and scale rather than
this);
world orientation and scale, which can prevent common UI scaling issues.",this
}
value;
this.parentInternal = value
this
}
}
internal extern Transform parentInternal
{
[WrapperlessIcall]
[MethodImpl(MethodImplOptions.InternalCall)]
get;
[WrapperlessIcall]
[MethodImpl(MethodImplOptions.InternalCall)]
3260t;
}
public Matrix4x4 worldToLocalMatrix
{
get
{
Matrix4x4 result;
this.INTERNAL_get_worldToLocalMatrix(out result);
related
this
return result;
土耳其语在线翻译
}
}
public Matrix4x4 localToWorldMatrix
{
get
{
Matrix4x4 result;
this.INTERNAL_get_localToWorldMatrix(out result);
this
this.INTERNAL_get_localToWorldMatrix(out result);
this
return result;
}
}
public extern Transform root
{
[WrapperlessIcall]
fd是什么意思[MethodImpl(MethodImplOptions.InternalCall)]
get;
}
public extern int childCount
{
[WrapperlessIcall]
[MethodImpl(MethodImplOptions.InternalCall)]
get;
}
public Vector3 lossyScale
{
get
{
Vector3 result;
ava是什么意思
this
this.INTERNAL_get_lossyScale(out result);
return result;
用发展的眼光看中国}
}
public extern bool hasChanged
{
[WrapperlessIcall]
[MethodImpl(MethodImplOptions.InternalCall)]
get;
[WrapperlessIcall]
[MethodImpl(MethodImplOptions.InternalCall)]
t;
}
protected Transform()
{
}
[WrapperlessIcall]
[MethodImpl(MethodImplOptions.InternalCall)]
value);
private extern void INTERNAL_get_position(out Vector3value
[WrapperlessIcall]
[MethodImpl(MethodImplOptions.InternalCall)]
value);
private extern void INTERNAL_t_position(ref Vector3valuepep小学英语四年级下册教案
[WrapperlessIcall]
[MethodImpl(MethodImplOptions.InternalCall)]
value);
private extern void INTERNAL_get_localPosition(out Vector3value        [WrapperlessIcall]

本文发布于:2023-06-17 11:25:40,感谢您对本站的认可!

本文链接:https://www.wtabcd.cn/fanwen/fan/78/975163.html

版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。

标签:获得   眼光   教案
相关文章
留言与评论(共有 0 条评论)
   
验证码:
推荐文章
排行榜
Copyright ©2019-2022 Comsenz Inc.Powered by © 专利检索| 网站地图