Exemplo n.º 1
0
        private DropdownList <string> GetObjectSelectionValues()
        {
            objectDropdownList = new DropdownList <string>();
            objectDropdownList.Add("None", "None");
            objectDropdownList.Add(objectSearchSelection["Untagged"]
                ? "Untagged  ✓"
                : "Untagged", "Untagged");

            for (int i = 0; i < referenceManager.referenceScriptableObjects.Count; i++)
            {
                var rm = referenceManager.referenceScriptableObjects[i];
                if (rm.name == "TypeData_Default")
                {
                    continue;
                }

                objectDropdownList.Add(objectSearchSelection[rm.name]
                    ? $"{rm.name}  ✓"
                    : rm.name, rm.name);
            }

            objectSearchType = objectDropdownList
                               .Select(x => x.Key == "None")
                               .FirstOrDefault()
                               .ToString();

            return(objectDropdownList);
        }
Exemplo n.º 2
0
        private void OnValidate()
        {
            if (!activeWhenGameModeIs)
            {
                return;
            }

            byte i = 0;

            foreach (var wep in activeWhenGameModeIs.weapons)
            {
                weaponListValues.Add(wep.name, i++);
            }
        }
Exemplo n.º 3
0
    public DropdownList <string> GetLanguage()
    {
        var result = new DropdownList <string>();

        foreach (var obj in Resources.FindObjectsOfTypeAll(typeof(ScriptableObject)) as ScriptableObject[])
        {
            if (EditorUtility.IsPersistent(obj))
            {
                string pathToAsset = UnityEditor.AssetDatabase.GetAssetPath(obj);
                if (pathToAsset.StartsWith("Assets/Resources/Datas/Localization"))
                {
                    result.Add(obj.name, obj.name);
                }
            }
        }
        return(result);
    }
        public IDropdownList GetAssetNames()
        {
            var values = new DropdownList <string>()
            {
                { "None", string.Empty }
            };

            for (var i = 0; i < _scenes.Length; i++)
            {
                if (_scenes[i] == null || !_scenes[i].editorAsset || string.IsNullOrEmpty(_scenes[i].AssetGUID))
                {
                    continue;
                }

                values.Add(_scenes[i].editorAsset.name, _scenes[i].AssetGUID);
            }

            return(values);
        }
Exemplo n.º 5
0
    public DropdownList <string> GetTextName()
    {
        var result     = new DropdownList <string>();
        var inGameText = InGameText.GetInstance();

        if (inGameText)
        {
            var textList = inGameText.GetTextList();
            foreach (var text in textList.texts)
            {
                result.Add(text.name, text.name);
            }
        }
        else
        {
            LogHelper.LogWarning("Missing In Game Text instance for Text Localization");
        }
        return(result);
    }
Exemplo n.º 6
0
 public void AddNewContext()
 {
     BA_ContextTypes.Add(NewContext, NewContext);
     NewContext = "Success!";
 }