Пример #1
0
        public void GetRandomFVRObjectFromCategory(FVRObject.ObjectCategory category)
        {
#if !UNITY_EDITOR && !UNITY_STANDALONE
            if (m_objectTable == null)
            {
                m_objectTable    = new ObjectTable();
                m_objectTableDef = (ObjectTableDef)ScriptableObject.CreateInstance(typeof(ObjectTableDef));
            }

            m_objectTable.Initialize(m_objectTableDef, category);
            UpdateCurrentGameObj(m_objectTable.GetRandomObject());
#endif
        }
Пример #2
0
        public void GetRandomBespokeAttachment()
        {
#if !UNITY_EDITOR && !UNITY_STANDALONE
            if (m_objectTable == null)
            {
                m_objectTable    = new ObjectTable();
                m_objectTableDef = (ObjectTableDef)ScriptableObject.CreateInstance(typeof(ObjectTableDef));
            }

            if (m_currentFVRObj != null && m_objectTable.GetRandomBespokeAttachment(m_currentFVRObj) != null)
            {
                UpdateCurrentGameObj(m_objectTable.GetRandomBespokeAttachment(m_currentFVRObj));
            }
            //else
            //make an "error" print
#endif
        }