Esempio n. 1
0
        void OnEnable()
        {
#if UNITY_EDITOR
            if (Application.isPlaying && !EditorOnlyDelegates.IsEntitled(false))
            {
                Debug.LogWarning(EntitlementsFailedMessage);
            }
#endif
            ModuleLoaderCore.instance.OnBehaviorEnable();
        }
        public void AddOrUpdateTrait(int dataID, string traitName, T value)
        {
#if UNITY_EDITOR
            if (!EditorOnlyDelegates.IsEntitled(true))
            {
                return;
            }
#endif

            Dictionary <int, T> collection;
            if (!m_Dictionary.TryGetValue(traitName, out collection))
            {
                collection = new Dictionary <int, T>();
                m_Dictionary.Add(traitName, collection);
            }

            collection[dataID] = value;
        }