Untiy相同周期在不同脚本中的执行顺序
可以设置脚本执行顺序Edit->Project Settings...->Script Execution Order
写两个测试脚本看看效果:
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class TestScriptA : MonoBehaviour
{
void Awake()
{
Debug.Log("TestScriptA: Awake()");
}
}
-----------------------------------------------------------------------------------
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class TestScriptB : MonoBehaviour
{
void Awake()
{
Debug.Log("TestScriptB: Awake()");
}
}
将TestScriptA.cs和TestScriptB.cs挂到场景中的一个GameObject上,运行看看效果。导航收录全站源码
跑跑卡丁车源码下载日志截图
跑跑卡丁车源码下载更多Unity开发教程
跑跑卡丁车源码下载跑跑卡丁车源码下载2024-12-22 21:43
2024-12-22 20:59
2024-12-22 20:32
2024-12-22 20:30
2024-12-22 20:03