Exemple #1
0
 void OnDisable()
 {
     if (m_builder != null)
     {
         m_builder.Dispose();
         m_builder = null;
     }
 }
Exemple #2
0
        void OnEnable()
        {
            var go = new GameObject("PrimMan");

            m_builder          = new PrimManBuilder(go.transform);
            m_builder.Updated += () =>
            {
                Fields.HeightInput.text = m_builder.Height.ToString();
            };
            m_builder.Height = m_height;

            Fields.HeightUp.onClick.AddListener(() =>
            {
                m_builder.Height += 1.0f;
            });
            Fields.HeightDown.onClick.AddListener(() =>
            {
                m_builder.Height -= 1.0f;
            });
            Fields.Export.onClick.AddListener(Export);
        }