2d0aaa98aa
- 重写 PageController.cs,为所有按钮回调添加完整 Debug.Log - 自动修复 _btnFixationBack:未赋值时自动查找 FixationPanel/BtnBack - 自动修复 _btnExperimentBack:未赋值时自动查找 ExperimentPanel/Navbar/BtnBack - 删除失效的 Canvas 根级冗余 BtnFixationBack - 添加 3D 角色模型资源(man/woman 模型、动画、TextMesh Pro) - 添加 ExperimentPanel UI 资源和 TrainingBackground 素材 测试方法:进入 Play 模式,查看 Console 以验证每个按钮的绑定状态和点击回调是否正常触发。
36 lines
1.1 KiB
C#
Executable File
36 lines
1.1 KiB
C#
Executable File
using UnityEngine;
|
|
using System.Collections;
|
|
using TMPro;
|
|
|
|
public class EnvMapAnimator : MonoBehaviour {
|
|
|
|
//private Vector3 TranslationSpeeds;
|
|
public Vector3 RotationSpeeds;
|
|
private TMP_Text m_textMeshPro;
|
|
private Material m_material;
|
|
|
|
|
|
void Awake()
|
|
{
|
|
//Debug.Log("Awake() on Script called.");
|
|
m_textMeshPro = GetComponent<TMP_Text>();
|
|
m_material = m_textMeshPro.fontSharedMaterial;
|
|
}
|
|
|
|
// Use this for initialization
|
|
IEnumerator Start ()
|
|
{
|
|
Matrix4x4 matrix = new Matrix4x4();
|
|
|
|
while (true)
|
|
{
|
|
//matrix.SetTRS(new Vector3 (Time.time * TranslationSpeeds.x, Time.time * TranslationSpeeds.y, Time.time * TranslationSpeeds.z), Quaternion.Euler(Time.time * RotationSpeeds.x, Time.time * RotationSpeeds.y , Time.time * RotationSpeeds.z), Vector3.one);
|
|
matrix.SetTRS(Vector3.zero, Quaternion.Euler(Time.time * RotationSpeeds.x, Time.time * RotationSpeeds.y , Time.time * RotationSpeeds.z), Vector3.one);
|
|
|
|
m_material.SetMatrix("_EnvMatrix", matrix);
|
|
|
|
yield return null;
|
|
}
|
|
}
|
|
}
|