版本号 2018.3.5 2018.4.1
public class test : MonoBehaviour
{
public Canvas canvas;
void Start()
{
AssetBundle asset = AssetBundle.LoadFromFile("Assets/Scenes/00step.ld");
GameObject startPanel= asset.LoadAsset<GameObject>("StartPanel");
//Instantiate(startPanel);
Instantiate(startPanel, canvas.transform);
startPanel.transform.rotation = Quaternion.Euler(0.0f, 0.0f, 0.0f);
Debug.Log(startPanel.transform.rotation);
// Instantiate(startPanel);
//startPanel.transform.localEulerAngles = new Vector3(0f, 0f, 0f);
//startPanel.transform.eulerAngles = new Vector3(0f, 0f, 0f);
Debug.Log(asset);
}
rect transform 的rotation 在inspector面板下显示是不正常的 并不是实际值
原文地址:https://www.cnblogs.com/pz904/p/12530774.html
时间: 2024-10-15 01:05:03