代码语言:javascript复制
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEditor;
public class SaveTransInfo : EditorWindow
{
[MenuItem("SaveTransInfo/SaveOriInfoTo #`")]
static void SaveOriInfoTo()
{
GameObject obj = Selection.activeGameObject;
Transform trans = obj.transform;
string angles = trans.localEulerAngles.x "," trans.localEulerAngles.y "," trans.localEulerAngles.z;
string str = trans.localPosition.x "," trans.localPosition.y "," trans.localPosition.z ";" angles;
TextEditor te = new TextEditor();
te.content = new GUIContent(str);
te.SelectAll();
te.Copy();
}
}
配合策划改表