示例#1
0
    void OnEnable()
    {
        BoneSize         = EditorPrefs.GetFloat("Puppet2D_EditorBoneSize", 0.85f);
        ControlSize      = EditorPrefs.GetFloat("Puppet2D_EditorControlSize", 0.85f);
        VertexHandleSize = EditorPrefs.GetFloat("Puppet2D_EditorVertexHandleSize", 0.8f);
        BoneCreation     = EditorPrefs.GetBool("Puppet2D_BoneCreation", false);

        _boneSortingIndex    = EditorPrefs.GetInt("Puppet2D_BoneLayer", 0);
        _controlSortingIndex = EditorPrefs.GetInt("Puppet2D_ControlLayer", 0);


        Puppet2D_Selection.GetSelectionString();
    }
示例#2
0
    public static void SaveSelectionLoad(object index)
    {
        Puppet2D_Selection.GetSelectionString();
        string[]          goNames = Puppet2D_Editor.selectedControls[(int)index].ToArray();
        List <GameObject> gos     = new List <GameObject>();

        foreach (string goName in goNames)
        {
            gos.Add(GameObject.Find(goName));
        }
        Selection.objects = gos.ToArray();
        gos.Clear();
        SetSelectionString();
    }