コード例 #1
0
        public void InitHologram(HologramType contentType)
        {
            HologramType = contentType;

            m_ManipulationSettings = GetComponent <ManipulatorSettings>();
            if (m_ManipulationSettings == null)
            {
                m_ManipulationSettings = ManipulatorSettings.DefaultSetting;
            }


            if (!m_IsInitialized && m_ManipulationSettings != null)
            {
                SaveChildrenAndRenderers();
                InitBoundaries();
                SetHologramFaces();
                SetParentGameObjects();
                InitControllers();

                UpdateParentPosition(transform.TransformPoint(m_BoundaryBox.Center));
                AdjustBoundarySize();
                UpdateParentPosition(transform.TransformPoint(m_BoundaryBox.BottomCenter));

                UpdateHologramControllers(false);
                PlaceMenu();
                SetHologramState(HologramState.Inactive);

                RegisterHologramInActiveHologramList();

                m_IsInitialized = true;
            }
        }
コード例 #2
0
 public void Awake()
 {
     //Kind of hacky solution to find the default settings, since I don't like bloating existing projects
     //with tags and such, I try to find a "naked" gameObject that has ManipulationSettings and consider
     //that the default one
     if (m_DefaultSetting == null && GetComponent <HologramManipulator>() == null)
     {
         m_DefaultSetting = this;
     }
 }