예제 #1
0
        /// <summary>
        /// Initialize the manager after deserialization.
        /// </summary>
        public override void Initialize(MainManagerWindow mainManagerWindow)
        {
            base.Initialize(mainManagerWindow);

            m_DocumentationTexture = FindTexture(c_DocumentationTextureGUID);
            m_IntegrationsTexture  = FindTexture(c_IntegrationsTextureGUID);
            m_ForumTexture         = FindTexture(c_ForumTextureGUID);
            m_VideosTexture        = FindTexture(c_VideosTextureGUID);
            m_DiscordTexture       = FindTexture(c_DiscordTextureGUID);
            m_RateReviewTexture    = FindTexture(c_RateReviewTextureGUID);
            m_ShowcaseTexture      = FindTexture(c_ShowcaseTextureGUID);
        }
        /// <summary>
        /// Initialize the manager after deserialization.
        /// </summary>
        public override void Initialize(MainManagerWindow mainManagerWindow)
        {
            base.Initialize(mainManagerWindow);

            BuildInstalledIntegrations();

            if (!m_Initialized)
            {
                m_DrawIntegrationInspectors = m_IntegrationInspectors != null && m_IntegrationInspectors.Length > 0;
                m_Initialized = true;
            }
        }
예제 #3
0
        /// <summary>
        /// Initialize the manager after deserialization.
        /// </summary>
        public override void Initialize(MainManagerWindow mainManagerWindow)
        {
            base.Initialize(mainManagerWindow);

            BuildInstalledAddOns();

            if (!m_Initialized)
            {
                m_DrawInstalledAddOns = m_AvailableAddOns != null && m_AvailableAddOns.Length > 0;
                m_Initialized         = true;
            }
        }
            /// <summary>
            /// Constructor for the AssetIntegration class.
            /// </summary>
            public AssetIntegration(int id, string name, string iconURL, string integrationURL, MainManagerWindow mainManagerWindow)
            {
                m_ID                = id;
                m_Name              = name;
                m_IntegrationURL    = integrationURL;
                m_MainManagerWindow = mainManagerWindow;

                // Start loading the icon as soon as the url is retrieved.
                m_TextureDownloadHandler      = new UnityEngine.Networking.DownloadHandlerTexture();
                m_IconRequest                 = UnityEngine.Networking.UnityWebRequest.Get(iconURL);
                m_IconRequest.downloadHandler = m_TextureDownloadHandler;
                m_IconRequest.SendWebRequest();
            }
예제 #5
0
        /// <summary>
        /// Initialize the manager after deserialization.
        /// </summary>
        public override void Initialize(MainManagerWindow mainManagerWindow)
        {
            base.Initialize(mainManagerWindow);

            // Look for the ItemCollection within the scene if it isn't already populated.
            if (m_ItemCollection == null)
            {
                m_ItemCollection = ManagerUtility.FindItemCollection(m_MainManagerWindow);
            }

            // The ItemCollection may have been serialized.
            if (m_ItemCollection != null)
            {
                // The category may be invalid.
                var categories = m_ItemCollection.Categories;
                if (categories != null)
                {
                    for (int i = categories.Length - 1; i > -1; --i)
                    {
                        if (categories[i] != null)
                        {
                            continue;
                        }
                        ArrayUtility.RemoveAt(ref categories, i);
                    }
                    m_ItemCollection.Categories = categories;
                }

                // The CategoryState would have been reconstructed after deserialization so update the state within the tree.
                m_CategoryTreeView.state.expandedIDs   = m_CategoryTreeViewState.expandedIDs;
                m_CategoryTreeView.state.lastClickedID = m_CategoryTreeViewState.lastClickedID;
                m_CategoryTreeView.state.searchString  = m_CategoryTreeViewState.searchString;
                m_CategoryTreeView.state.selectedIDs   = m_CategoryTreeViewState.selectedIDs;
                m_CategoryTreeViewState = m_CategoryTreeView.state;

                // Update the tree with the new collection.
                (m_CategoryTreeView.TreeModal as CategoryCollectionModal).ItemCollection = m_ItemCollection;
                m_CategoryTreeView.Reload();

                // The TreeViewState would have been reconstructed after deserialization so update the state within the tree.
                m_ItemTypeTreeView.state.expandedIDs   = m_ItemTypeTreeViewState.expandedIDs;
                m_ItemTypeTreeView.state.lastClickedID = m_ItemTypeTreeViewState.lastClickedID;
                m_ItemTypeTreeView.state.searchString  = m_ItemTypeTreeViewState.searchString;
                m_ItemTypeTreeView.state.selectedIDs   = m_ItemTypeTreeViewState.selectedIDs;
                m_ItemTypeTreeViewState = m_ItemTypeTreeView.state;

                // Update the tree with the new collection.
                (m_ItemTypeTreeView.TreeModal as ItemTypeCollectionModal).ItemCollection = m_ItemCollection;
                m_ItemTypeTreeView.Reload();
            }
        }
예제 #6
0
            /// <summary>
            /// Constructor for the AvailableAddOn class.
            /// </summary>
            public AvailableAddOn(int id, string name, string iconURL, string addOnURL, string description, string type, MainManagerWindow mainManagerWindow)
            {
                m_ID          = id;
                m_Name        = name;
                m_AddOnURL    = addOnURL;
                m_Description = description;
                // The add-on is installed if the type exists.
                m_Installed         = !string.IsNullOrEmpty(type) && Shared.Utility.TypeUtility.GetType(type) != null;
                m_MainManagerWindow = mainManagerWindow;

                // Start loading the icon as soon as the url is retrieved.
                m_TextureDownloadHandler      = new UnityEngine.Networking.DownloadHandlerTexture();
                m_IconRequest                 = UnityEngine.Networking.UnityWebRequest.Get(iconURL);
                m_IconRequest.downloadHandler = m_TextureDownloadHandler;
                m_IconRequest.SendWebRequest();
            }
예제 #7
0
        /// <summary>
        /// Initialize the manager after deserialization.
        /// </summary>
        public override void Initialize(MainManagerWindow mainManagerWindow)
        {
            base.Initialize(mainManagerWindow);

            // Look for the ItemCollection within the scene if it isn't already populated.
            if (m_AnimationStateCollection == null)
            {
                m_AnimationStateCollection = UCCEManagerUtility.FindAnimStateColection(m_MainManagerWindow);
            }

            // The ItemCollection may have been serialized.
            if (m_AnimationStateCollection != null)
            {
                m_ItemIdTab.Initialize(m_AnimationStateCollection.ItemIds);
                m_ItemStateIndexTab.Initialize(m_AnimationStateCollection.ItemStateIndexes);
                m_AbilityIndexTab.Initialize(m_AnimationStateCollection.AbilityIndexes);
            }
        }
예제 #8
0
        /// <summary>
        /// Initialize the manager after deserialization.
        /// </summary>
        public override void Initialize(MainManagerWindow mainManagerWindow)
        {
            base.Initialize(mainManagerWindow);

            // Find the state configuration.
            var stateConfiguration = ManagerUtility.FindStateConfiguration(m_MainManagerWindow);

            if (stateConfiguration != null)
            {
                if (m_AddStateConfiguration == null)
                {
                    m_AddStateConfiguration = stateConfiguration;
                }
                if (m_ExistingStateConfiguration == null)
                {
                    m_ExistingStateConfiguration = stateConfiguration;
                }
            }

            m_InvisibleShadowCaster = ManagerUtility.FindInvisibleShadowCaster(m_MainManagerWindow);
        }
예제 #9
0
        /// <summary>
        /// Initialize the manager after deserialization.
        /// </summary>
        public override void Initialize(MainManagerWindow mainManagerWindow)
        {
            base.Initialize(mainManagerWindow);

            // Set the default perspective based on what asset is installed.
            if (m_Perspective == Perspective.None)
            {
#if FIRST_PERSON_CONTROLLER
                m_Perspective = Perspective.First;
#elif THIRD_PERSON_CONTROLLER
                m_Perspective = Perspective.Third;
#endif
            }

            // Get a list of the available view types.
            var assemblies = AppDomain.CurrentDomain.GetAssemblies();
            for (int i = 0; i < assemblies.Length; ++i)
            {
                try {
                    var assemblyTypes = assemblies[i].GetTypes();
                    for (int j = 0; j < assemblyTypes.Length; ++j)
                    {
                        // Must derive from ViewType.
                        if (!typeof(UltimateCharacterController.Camera.ViewTypes.ViewType).IsAssignableFrom(assemblyTypes[j]))
                        {
                            continue;
                        }

                        // Ignore abstract classes.
                        if (assemblyTypes[j].IsAbstract)
                        {
                            continue;
                        }

                        if (assemblyTypes[j].FullName.Contains("FirstPersonController"))
                        {
                            m_FirstPersonViewTypes.Add(assemblyTypes[j]);
                        }
                        else if (assemblyTypes[j].FullName.Contains("ThirdPersonController"))
                        {
                            m_ThirdPersonViewTypes.Add(assemblyTypes[j]);
                        }
                    }
                } catch (Exception) {
                    continue;
                }
            }

            // Create an array of display names for the popup.
            if (m_FirstPersonViewTypes.Count > 0)
            {
                m_FirstPersonViewTypeStrings = new string[m_FirstPersonViewTypes.Count];
                for (int i = 0; i < m_FirstPersonViewTypes.Count; ++i)
                {
                    m_FirstPersonViewTypeStrings[i] = InspectorUtility.DisplayTypeName(m_FirstPersonViewTypes[i], true);
                }
            }
            if (m_ThirdPersonViewTypes.Count > 0)
            {
                m_ThirdPersonViewTypeStrings = new string[m_ThirdPersonViewTypes.Count];
                for (int i = 0; i < m_ThirdPersonViewTypes.Count; ++i)
                {
                    m_ThirdPersonViewTypeStrings[i] = InspectorUtility.DisplayTypeName(m_ThirdPersonViewTypes[i], true);
                }
            }

            // Find the state configuration.
            var stateConfiguration = ManagerUtility.FindStateConfiguration(m_MainManagerWindow);
            if (stateConfiguration != null)
            {
                if (m_StateConfiguration == null)
                {
                    m_StateConfiguration = stateConfiguration;
                }
            }
        }
예제 #10
0
        /// <summary>
        /// Initialize the manager after deserialization.
        /// </summary>
        public override void Initialize(MainManagerWindow mainManagerWindow)
        {
            base.Initialize(mainManagerWindow);

            BuildInstalledAddOns();
        }