标签:static nbsp sharp blog class with cal form pre
public static GameObject lastParent; [MenuItem("GameObject/MakeParentWithLocal")] public static void MakeParentWithLocal() { //始终是按照字母排序的,第一个总是字母在前的,暂时没找到方法。 foreach (Transform transform in Selection.transforms) { if (transform != Selection.activeTransform) { transform.SetParent(Selection.activeTransform,false); } } }
有个硬伤,就是不能undo,很蛋疼,但是测试了undo类的所有东西,都搞不定,有空再研究吧
标签:static nbsp sharp blog class with cal form pre
原文地址:http://www.cnblogs.com/ptqueen/p/6626317.html