public void Init(GameObject[] selection)
        {
            this.selection = selection.ToList();

            scatterTool = GetComponent <ScatterTool>();

            //Debug.Log(scatterTool.iterations);
            //Debug.Log(scatterTool.numberOfElements);
            CombineObjects();
            CreateIterations();
        }
Exemplo n.º 2
0
        private void CreateScatterObject()
        {
            try
            {
                scatterToolGO = FindObjectOfType <ScatterTool>().gameObject;
            }
            catch
            {
                scatterToolGO = new GameObject();
                scatterToolGO.AddComponent <ScatterTool>();
                scatterToolGO.name      = "ScatterObject";
                scatterToolGO.hideFlags = HideFlags.HideInHierarchy;
                scatterToolGO.hideFlags = HideFlags.HideInInspector;
            }

            scatterTool   = scatterToolGO.GetComponent <ScatterTool>();
            scatterImp    = scatterToolGO.GetComponent <STImplementation>();
            scatterParams = scatterToolGO.GetComponent <STParameters>();
        }
        void OnEnable()
        {
            scatterTool = (ScatterTool)target;

            itemsAreLoaded = serializedObject.FindProperty("itemsAreLoaded");
        }