private void OnEnable()
 {
     picker = this.GetComponent <grabcontrol>();
     picker.OnParticlePickedLeft += Picker_OnParticleDraggedLeft;
     //picker.OnParticleDragged+= Picker_OnParticleDragged;
     picker.OnParticleReleasedLeft  += Picker_OnParticleReleasedLeft;
     picker.OnParticlePickedRight   += Picker_OnParticleDraggedRight;
     picker.OnParticleReleasedRight += Picker_OnParticleReleasedRight;
 }
예제 #2
0
    void Start()
    {
        EditorWindow currentscreen = EditorWindow.GetWindow <EditorWindow>();

        //Debug.Log(currentscreen.position.size);
        //currentscreen.position = new Rect(currentscreen.position.center, currentscreen.position.size);
        //Screen.SetResolution(1000, 600, true);
        //Debug.Log(Screen.width);
        //Debug.Log(Screen.height);
        this.gameObject.tag = "cloth";
        ObiCloth    cloth  = this.gameObject.GetComponent <ObiCloth>();
        grabcontrol picker = this.gameObject.GetComponent <grabcontrol>();

        if (cloth != null)
        {
            addclothflag = 1;
            if (picker != null)
            {
                addpickerflag = 1;
            }
        }
        addscript();
    }