Beispiel #1
0
        private static void SaveToIndex(UnityEditor.MenuCommand mc, int index)
        {
            PositionSwapper ps = mc.context as PositionSwapper;

            while (ps.Positions.Length <= index)
            {
                UnityEditor.ArrayUtility.Add <Vector3>(ref ps.Positions, Vector3.zero);
            }
            ps.Positions[index] = ps.transform.localPosition;
        }
Beispiel #2
0
        private static void LoadIndex(UnityEditor.MenuCommand mc, int index)
        {
            PositionSwapper ps = mc.context as PositionSwapper;

            ps.SetPosition(index);
        }