init
This commit is contained in:
commit
c7d8c303a6
499 changed files with 2349700 additions and 0 deletions
71
Assets/ABI.CCK/Scripts/CCKLocalizationProvider.cs
Executable file
71
Assets/ABI.CCK/Scripts/CCKLocalizationProvider.cs
Executable file
|
@ -0,0 +1,71 @@
|
|||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using ABI.CCK.Scripts.Translation;
|
||||
using UnityEditor;
|
||||
using UnityEngine;
|
||||
|
||||
public static class CCKLocalizationProvider
|
||||
{
|
||||
|
||||
private struct LocalizationDriver
|
||||
{
|
||||
public string LanguageName;
|
||||
public Dictionary<string, string> LanguageDefinition;
|
||||
}
|
||||
|
||||
|
||||
private static readonly List<LocalizationDriver> KnownLanguages = new List<LocalizationDriver>()
|
||||
{
|
||||
new LocalizationDriver(){ LanguageName = "English", LanguageDefinition = English.Localization },
|
||||
new LocalizationDriver(){ LanguageName = "Deutsch", LanguageDefinition = German.Localization },
|
||||
new LocalizationDriver(){ LanguageName = "Nederlands", LanguageDefinition = Dutch.Localization },
|
||||
new LocalizationDriver(){ LanguageName = "日本語", LanguageDefinition = Japanese.Localization },
|
||||
new LocalizationDriver(){ LanguageName = "한국어", LanguageDefinition = Korean.Localization },
|
||||
new LocalizationDriver(){ LanguageName = "中文(简体)", LanguageDefinition = Chinese.Localization },
|
||||
new LocalizationDriver(){ LanguageName = "Français", LanguageDefinition = French.Localization },
|
||||
new LocalizationDriver(){ LanguageName = "русский", LanguageDefinition = Russian.Localization }
|
||||
};
|
||||
|
||||
public static List<string> GetKnownLanguages()
|
||||
{
|
||||
List<string> knownLanguages = new List<string>();
|
||||
|
||||
foreach (LocalizationDriver driver in KnownLanguages)
|
||||
{
|
||||
knownLanguages.Add(driver.LanguageName);
|
||||
}
|
||||
|
||||
return knownLanguages;
|
||||
}
|
||||
|
||||
|
||||
public static string GetLocalizedText(string input)
|
||||
{
|
||||
try
|
||||
{
|
||||
string output;
|
||||
#if UNITY_EDITOR
|
||||
KnownLanguages.Find(match => match.LanguageName == EditorPrefs.GetString("ABI_CCKLocals", "English")).LanguageDefinition.TryGetValue(input, out output);
|
||||
#else
|
||||
KnownLanguages.Find(match => match.LanguageName == "English").LanguageDefinition.TryGetValue(input, out output);
|
||||
#endif
|
||||
|
||||
if (string.IsNullOrEmpty(output))
|
||||
{
|
||||
KnownLanguages.Find(match => match.LanguageName == "English").LanguageDefinition.TryGetValue(input, out output);
|
||||
Debug.LogWarning($"[CCK] [LocalizationProvider] Unable to use localized string. The defined language is likely not or not fully supported.");
|
||||
}
|
||||
|
||||
return output;
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
string output;
|
||||
KnownLanguages.Find(match => match.LanguageName == "English").LanguageDefinition.TryGetValue(input, out output);
|
||||
Debug.LogWarning($"[CCK] [LocalizationProvider] Unable to use localized string: {e}. The defined language is likely not or not fully supported.");
|
||||
return output;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
11
Assets/ABI.CCK/Scripts/CCKLocalizationProvider.cs.meta
Executable file
11
Assets/ABI.CCK/Scripts/CCKLocalizationProvider.cs.meta
Executable file
|
@ -0,0 +1,11 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 40cc13c6c129474e8e5427d6003a7cef
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
17
Assets/ABI.CCK/Scripts/CCKLocalizationReplacer.cs
Executable file
17
Assets/ABI.CCK/Scripts/CCKLocalizationReplacer.cs
Executable file
|
@ -0,0 +1,17 @@
|
|||
using UnityEngine;
|
||||
using UnityEngine.UI;
|
||||
|
||||
namespace ABI.CCK.Scripts
|
||||
{
|
||||
public class CCKLocalizationReplacer : MonoBehaviour
|
||||
{
|
||||
public string identifier;
|
||||
|
||||
public void Start()
|
||||
{
|
||||
var text = gameObject.GetComponent<Text>();
|
||||
if (text != null)
|
||||
text.text = CCKLocalizationProvider.GetLocalizedText(identifier);
|
||||
}
|
||||
}
|
||||
}
|
11
Assets/ABI.CCK/Scripts/CCKLocalizationReplacer.cs.meta
Executable file
11
Assets/ABI.CCK/Scripts/CCKLocalizationReplacer.cs.meta
Executable file
|
@ -0,0 +1,11 @@
|
|||
fileFormatVersion: 2
|
||||
guid: fe48d657d60bbcd4790209b4f3c5ed9a
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
63
Assets/ABI.CCK/Scripts/CCK_WorldPreviewCapture.cs
Executable file
63
Assets/ABI.CCK/Scripts/CCK_WorldPreviewCapture.cs
Executable file
|
@ -0,0 +1,63 @@
|
|||
using ABI.CCK.Components;
|
||||
using UnityEditor;
|
||||
using UnityEngine;
|
||||
using UnityEngine.Rendering;
|
||||
|
||||
namespace ABI.CCK.Scripts.Editor
|
||||
{
|
||||
public class CCK_WorldPreviewCapture
|
||||
{
|
||||
static RenderTexture cubemapLeft;
|
||||
static RenderTexture cubemapRight;
|
||||
static RenderTexture equirect;
|
||||
|
||||
public static Texture2D CapturePreview(Transform position, int size = 4096, float height = 1f, float stereoSeparation = 0.064f)
|
||||
{
|
||||
cubemapLeft = new RenderTexture(size, size, 0);
|
||||
cubemapRight = new RenderTexture(size, size, 0);
|
||||
equirect = new RenderTexture(size, size, 0);
|
||||
|
||||
cubemapLeft.dimension = TextureDimension.Cube;
|
||||
cubemapRight.dimension = TextureDimension.Cube;
|
||||
|
||||
var cameraObject = new GameObject("WorldPreviewCamera");
|
||||
Camera cam = cameraObject.AddComponent<Camera>();
|
||||
cam.useOcclusionCulling = false;
|
||||
|
||||
cameraObject.transform.position = position.position + new Vector3(0, height, 0);
|
||||
|
||||
cam.stereoSeparation = stereoSeparation;
|
||||
cam.RenderToCubemap(cubemapLeft, 63, Camera.MonoOrStereoscopicEye.Left);
|
||||
cam.RenderToCubemap(cubemapRight, 63, Camera.MonoOrStereoscopicEye.Right);
|
||||
|
||||
cubemapLeft.ConvertToEquirect(equirect, Camera.MonoOrStereoscopicEye.Left);
|
||||
cubemapRight.ConvertToEquirect(equirect, Camera.MonoOrStereoscopicEye.Right);
|
||||
|
||||
RenderTexture.active = equirect;
|
||||
|
||||
var result = new Texture2D(size, size);
|
||||
result.ReadPixels(new Rect(0, 0, result.width, result.height), 0, 0);
|
||||
result.Apply();
|
||||
|
||||
Object.DestroyImmediate(cameraObject);
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
public static void CreatePanoImages()
|
||||
{
|
||||
var foundCVRWorld = MonoBehaviour.FindObjectsOfType<CVRWorld>();
|
||||
var world = foundCVRWorld[0];
|
||||
|
||||
Texture2D pano = CapturePreview(world.transform, 1024);
|
||||
|
||||
byte[] bytes = pano.EncodeToPNG();
|
||||
System.IO.File.WriteAllBytes(Application.persistentDataPath + "/bundle_pano_1024.png", bytes);
|
||||
|
||||
pano = CapturePreview(world.transform, 4096);
|
||||
|
||||
bytes = pano.EncodeToPNG();
|
||||
System.IO.File.WriteAllBytes(Application.persistentDataPath + "/bundle_pano_4096.png", bytes);
|
||||
}
|
||||
}
|
||||
}
|
11
Assets/ABI.CCK/Scripts/CCK_WorldPreviewCapture.cs.meta
Executable file
11
Assets/ABI.CCK/Scripts/CCK_WorldPreviewCapture.cs.meta
Executable file
|
@ -0,0 +1,11 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 5408d58c8c3d0974fbd3d08fd98e113c
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
2369
Assets/ABI.CCK/Scripts/CVRAdvancedAvatarSettings.cs
Executable file
2369
Assets/ABI.CCK/Scripts/CVRAdvancedAvatarSettings.cs
Executable file
File diff suppressed because it is too large
Load diff
11
Assets/ABI.CCK/Scripts/CVRAdvancedAvatarSettings.cs.meta
Executable file
11
Assets/ABI.CCK/Scripts/CVRAdvancedAvatarSettings.cs.meta
Executable file
|
@ -0,0 +1,11 @@
|
|||
fileFormatVersion: 2
|
||||
guid: f83ec66ba3b347640aeebac76fa29966
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
8
Assets/ABI.CCK/Scripts/Editor.meta
Executable file
8
Assets/ABI.CCK/Scripts/Editor.meta
Executable file
|
@ -0,0 +1,8 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 08237d07022e24944b8f0f1d5db3c8e5
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
760
Assets/ABI.CCK/Scripts/Editor/CCK_BuildManagerWindow.cs
Executable file
760
Assets/ABI.CCK/Scripts/Editor/CCK_BuildManagerWindow.cs
Executable file
|
@ -0,0 +1,760 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Net.Http;
|
||||
using System.Reflection;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Xml.Linq;
|
||||
using System.Xml.XPath;
|
||||
using ABI.CCK.Components;
|
||||
using ABI.CCK.Scripts.Runtime;
|
||||
using Abi.Newtonsoft.Json;
|
||||
using UnityEditor;
|
||||
using UnityEditor.SceneManagement;
|
||||
using UnityEditor.UIElements;
|
||||
using UnityEngine;
|
||||
using UnityEngine.Networking;
|
||||
using UnityEngine.SceneManagement;
|
||||
|
||||
namespace ABI.CCK.Scripts.Editor
|
||||
{
|
||||
[InitializeOnLoad]
|
||||
public class CCK_BuildManagerWindow : EditorWindow
|
||||
{
|
||||
public static string Version = "3.4 RELEASE";
|
||||
public static int BuildID = 90;
|
||||
private const string CCKVersion = "3.4 RELEASE (Build 92)";
|
||||
|
||||
private string[] SupportedUnityVersions = new[]
|
||||
{
|
||||
"2019.4.0f1", "2019.4.1f1", "2019.4.2f1", "2019.4.3f1", "2019.4.4f1", "2019.4.5f1", "2019.4.6f1",
|
||||
"2019.4.7f1", "2019.4.8f1", "2019.4.9f1", "2019.4.10f1", "2019.4.11f1", "2019.4.12f1",
|
||||
"2019.4.13f1", "2019.4.14f1", "2019.4.15f1", "2019.4.16f1", "2019.4.17f1", "2019.4.18f1",
|
||||
"2019.4.19f1", "2019.4.20f1", "2019.4.21f1", "2019.4.22f1", "2019.4.23f1", "2019.4.24f1",
|
||||
"2019.4.25f1", "2019.4.26f1", "2019.4.27f1", "2019.4.28f1", "2019.4.29f1", "2019.4.30f1",
|
||||
"2019.4.31f1"
|
||||
};
|
||||
|
||||
string _username;
|
||||
string _key;
|
||||
|
||||
public Texture2D abiLogo;
|
||||
private bool _attemptingToLogin;
|
||||
private bool _loggedIn;
|
||||
private bool _hasAttemptedToLogin;
|
||||
private bool _allowedToUpload;
|
||||
private string _apiUserRank;
|
||||
private string _apiCreatorRank;
|
||||
Vector2 scrollPosAvatar;
|
||||
Vector2 scrollPosSpawnable;
|
||||
Vector2 scrollPosWorld;
|
||||
|
||||
private int _tab;
|
||||
private Vector2 _scroll;
|
||||
|
||||
private static PropertyInfo _legacyBlendShapeImporter;
|
||||
|
||||
private static PropertyInfo legacyBlendShapeImporter
|
||||
{
|
||||
get
|
||||
{
|
||||
if(_legacyBlendShapeImporter != null)
|
||||
{
|
||||
return _legacyBlendShapeImporter;
|
||||
}
|
||||
|
||||
Type modelImporterType = typeof(ModelImporter);
|
||||
_legacyBlendShapeImporter = modelImporterType.GetProperty(
|
||||
"legacyComputeAllNormalsFromSmoothingGroupsWhenMeshHasBlendShapes",
|
||||
BindingFlags.Instance | BindingFlags.NonPublic | BindingFlags.Public
|
||||
);
|
||||
|
||||
return _legacyBlendShapeImporter;
|
||||
}
|
||||
}
|
||||
|
||||
[MenuItem("Alpha Blend Interactive/Control Panel (Builder and Settings)", false, 200)]
|
||||
static void Init()
|
||||
{
|
||||
CCK_BuildManagerWindow window = (CCK_BuildManagerWindow)GetWindow(typeof(CCK_BuildManagerWindow), false, $"CCK :: Control Panel");
|
||||
window.Show();
|
||||
}
|
||||
|
||||
void OnDisable()
|
||||
{
|
||||
EditorApplication.update -= EditorUpdate;
|
||||
EditorApplication.playModeStateChanged -= OnEditorStateUpdated;
|
||||
}
|
||||
|
||||
void OnEnable()
|
||||
{
|
||||
abiLogo = (Texture2D) AssetDatabase.LoadAssetAtPath("Assets/ABI.CCK/GUIAssets/abibig.png", typeof(Texture2D));
|
||||
|
||||
EditorApplication.update -= EditorUpdate;
|
||||
EditorApplication.update += EditorUpdate;
|
||||
EditorApplication.playModeStateChanged -= OnEditorStateUpdated;
|
||||
EditorApplication.playModeStateChanged += OnEditorStateUpdated;
|
||||
|
||||
_username = EditorPrefs.GetString("m_ABI_Username");
|
||||
_key = EditorPrefs.GetString("m_ABI_Key");
|
||||
Login();
|
||||
}
|
||||
|
||||
void OnEditorStateUpdated(PlayModeStateChange state)
|
||||
{
|
||||
if (state == PlayModeStateChange.EnteredEditMode)
|
||||
{
|
||||
EditorPrefs.SetBool("m_ABI_isBuilding", false);
|
||||
EditorPrefs.SetString("m_ABI_TempVersion", Version);
|
||||
if (File.Exists(Application.dataPath + "/ABI.CCK/Resources/Cache/_CVRAvatar.prefab")) File.Delete(Application.dataPath + "/ABI.CCK/Resources/Cache/_CVRAvatar.prefab");
|
||||
if (File.Exists(Application.dataPath + "/ABI.CCK/Resources/Cache/_CVRSpawnable.prefab")) File.Delete(Application.dataPath + "/ABI.CCK/Resources/Cache/_CVRSpawnable.prefab");
|
||||
if (File.Exists(Application.dataPath + "/ABI.CCK/Resources/Cache/_CVRWorld.prefab")) File.Delete(Application.dataPath + "/ABI.CCK/Resources/Cache/_CVRWorld.prefab");
|
||||
if (File.Exists(Application.persistentDataPath + "/bundle.cvravatar")) File.Delete(Application.persistentDataPath + "/bundle.cvravatar");
|
||||
if (File.Exists(Application.persistentDataPath + "/bundle.cvravatar.manifest")) File.Delete(Application.persistentDataPath + "/bundle.cvravatar.manifest");
|
||||
if (File.Exists(Application.persistentDataPath + "/bundle.cvrprop")) File.Delete(Application.persistentDataPath + "/bundle.cvrprop");
|
||||
if (File.Exists(Application.persistentDataPath + "/bundle.cvrprop.manifest")) File.Delete(Application.persistentDataPath + "/bundle.cvrprop.manifest");
|
||||
if (File.Exists(Application.persistentDataPath + "/bundle.cvrworld")) File.Delete(Application.persistentDataPath + "/bundle.cvrworld");
|
||||
if (File.Exists(Application.persistentDataPath + "/bundle.cvrworld.manifest")) File.Delete(Application.persistentDataPath + "/bundle.cvrworld.manifest");
|
||||
if (File.Exists(Application.persistentDataPath + "/bundle.png")) File.Delete(Application.persistentDataPath + "/bundle.png");
|
||||
if (File.Exists(Application.persistentDataPath + "/bundle.png.manifest")) File.Delete(Application.persistentDataPath + "/bundle.png.manifest");
|
||||
if (File.Exists(Application.persistentDataPath + "/bundle_pano_1024.png")) File.Delete(Application.persistentDataPath + "/bundle_pano_1024.png");
|
||||
if (File.Exists(Application.persistentDataPath + "/bundle_pano_1024.png.manifest")) File.Delete(Application.persistentDataPath + "/bundle_pano_1024.png.manifest");
|
||||
if (File.Exists(Application.persistentDataPath + "/bundle_pano_4096.png")) File.Delete(Application.persistentDataPath + "/bundle_pano_4096.png");
|
||||
if (File.Exists(Application.persistentDataPath + "/bundle_pano_4096.png.manifest")) File.Delete(Application.persistentDataPath + "/bundle_pano_4096.png.manifest");
|
||||
AssetDatabase.Refresh();
|
||||
}
|
||||
|
||||
if (state == PlayModeStateChange.EnteredPlayMode && EditorPrefs.GetBool("m_ABI_isBuilding"))
|
||||
{
|
||||
var ui = Instantiate(AssetDatabase.LoadAssetAtPath<GameObject>("Assets/ABI.CCK/GUIAssets/CCK_UploaderHead.prefab"));
|
||||
OnGuiUpdater up = ui.GetComponentInChildren<OnGuiUpdater>();
|
||||
if (File.Exists(Application.dataPath + "/ABI.CCK/Resources/Cache/_CVRAvatar.prefab"))up.asset = Resources.Load<GameObject>("Cache/_CVRAvatar").GetComponent<CVRAssetInfo>();
|
||||
if (File.Exists(Application.dataPath + "/ABI.CCK/Resources/Cache/_CVRSpawnable.prefab"))up.asset = Resources.Load<GameObject>("Cache/_CVRSpawnable").GetComponent<CVRAssetInfo>();
|
||||
if (File.Exists(Application.dataPath + "/ABI.CCK/Resources/Cache/_CVRWorld.prefab"))up.asset = Resources.Load<GameObject>("Cache/_CVRWorld").GetComponent<CVRAssetInfo>();
|
||||
}
|
||||
}
|
||||
|
||||
void OnGUI()
|
||||
{
|
||||
var centeredStyle = GUI.skin.GetStyle("Label");
|
||||
centeredStyle.alignment = TextAnchor.UpperCenter;
|
||||
|
||||
GUILayout.Label(abiLogo, centeredStyle);
|
||||
EditorGUILayout.BeginVertical();
|
||||
|
||||
_tab = GUILayout.Toolbar (_tab, new string[] {CCKLocalizationProvider.GetLocalizedText("ABI_UI_BUILDPANEL_HEADING_BUILDER"), CCKLocalizationProvider.GetLocalizedText("ABI_UI_BUILDPANEL_HEADING_SETTINGS")});
|
||||
|
||||
_scroll = EditorGUILayout.BeginScrollView(_scroll);
|
||||
|
||||
switch (_tab)
|
||||
{
|
||||
case 0:
|
||||
if (!_loggedIn)
|
||||
{
|
||||
Tab_LogIn();
|
||||
}
|
||||
else
|
||||
{
|
||||
Tab_LoggedIn();
|
||||
}
|
||||
break;
|
||||
|
||||
case 1:
|
||||
Tab_Settings();
|
||||
break;
|
||||
}
|
||||
|
||||
EditorGUILayout.EndScrollView();
|
||||
|
||||
EditorGUILayout.EndVertical();
|
||||
}
|
||||
|
||||
private void Tab_LogIn()
|
||||
{
|
||||
EditorGUILayout.LabelField("ABI Community Hub Access", EditorStyles.boldLabel);
|
||||
EditorGUILayout.LabelField(CCKLocalizationProvider.GetLocalizedText("ABI_UI_BUILDPANEL_INFOTEXT_SIGNIN1"));
|
||||
EditorGUILayout.LabelField(CCKLocalizationProvider.GetLocalizedText("ABI_UI_BUILDPANEL_INFOTEXT_SIGNIN2"));
|
||||
EditorGUILayout.LabelField(CCKLocalizationProvider.GetLocalizedText("ABI_UI_BUILDPANEL_INFOTEXT_SIGNIN3"));
|
||||
EditorGUILayout.Space();
|
||||
_username = EditorGUILayout.TextField(CCKLocalizationProvider.GetLocalizedText("ABI_UI_BUILDPANEL_LOGIN_TEXT_USERNAME"), _username);
|
||||
_key = EditorGUILayout.PasswordField(CCKLocalizationProvider.GetLocalizedText("ABI_UI_BUILDPANEL_LOGIN_TEXT_ACCESSKEY"), _key);
|
||||
|
||||
if (GUILayout.Button(CCKLocalizationProvider.GetLocalizedText("ABI_UI_BUILDPANEL_LOGIN_BUTTON")))
|
||||
{
|
||||
Login();
|
||||
}
|
||||
|
||||
if (_hasAttemptedToLogin && !_loggedIn)
|
||||
{
|
||||
GUILayout.Label(CCKLocalizationProvider.GetLocalizedText("ABI_UI_BUILDPANEL_LOGIN_CREDENTIALS_INCORRECT"));
|
||||
}
|
||||
}
|
||||
|
||||
private void Tab_LoggedIn()
|
||||
{
|
||||
EditorGUILayout.LabelField(CCKLocalizationProvider.GetLocalizedText("ABI_UI_BUILDPANEL_HEADING_ACCOUNT_INFO"), EditorStyles.boldLabel);
|
||||
EditorGUILayout.Space();
|
||||
EditorGUILayout.LabelField(CCKLocalizationProvider.GetLocalizedText("ABI_UI_BUILDPANEL_INFOTEXT_AUTHENTICATED_AS"), _username);
|
||||
EditorGUILayout.LabelField(CCKLocalizationProvider.GetLocalizedText("ABI_UI_BUILDPANEL_INFOTEXT_USER_RANK"), _apiUserRank);
|
||||
EditorGUILayout.LabelField("CCK version ", CCKVersion);
|
||||
EditorGUILayout.Space();
|
||||
if (GUILayout.Button(CCKLocalizationProvider.GetLocalizedText("ABI_UI_BUILDPANEL_LOGOUT_BUTTON"))){
|
||||
bool logout = EditorUtility.DisplayDialog(
|
||||
CCKLocalizationProvider.GetLocalizedText("ABI_UI_BUILDPANEL_LOGOUT_DIALOG_TITLE"),
|
||||
CCKLocalizationProvider.GetLocalizedText("ABI_UI_BUILDPANEL_LOGOUT_DIALOG_BODY"),
|
||||
CCKLocalizationProvider.GetLocalizedText("ABI_UI_BUILDPANEL_LOGOUT_DIALOG_ACCEPT"),
|
||||
CCKLocalizationProvider.GetLocalizedText("ABI_UI_BUILDPANEL_LOGOUT_DIALOG_DECLINE"));
|
||||
if (logout) Logout();
|
||||
}
|
||||
EditorGUILayout.HelpBox(CCKLocalizationProvider.GetLocalizedText("ABI_UI_BUILDPANEL_INFOTEXT_DOCUMENTATION"), MessageType.Info);
|
||||
if (GUILayout.Button(CCKLocalizationProvider.GetLocalizedText("ABI_UI_BUILDPANEL_HEADING_DOCUMENTATION"))) Application.OpenURL("https://docs.abinteractive.net");
|
||||
EditorGUILayout.HelpBox(CCKLocalizationProvider.GetLocalizedText("ABI_UI_BUILDPANEL_WARNING_FEEDBACK"), MessageType.Info);
|
||||
if (GUILayout.Button(CCKLocalizationProvider.GetLocalizedText("ABI_UI_BUILDPANEL_HEADING_FEEDBACK"))) Application.OpenURL("https://hub.abinteractive.net/feedback");
|
||||
EditorGUILayout.HelpBox(CCKLocalizationProvider.GetLocalizedText("ABI_UI_BUILDPANEL_WARNING_FOLDERPATH"), MessageType.Warning);
|
||||
EditorGUILayout.Space();
|
||||
EditorGUILayout.LabelField(CCKLocalizationProvider.GetLocalizedText("ABI_UI_BUILDPANEL_HEADING_FOUNDCONTENT"), EditorStyles.boldLabel);
|
||||
List<CVRAvatar> avatars = new List<CVRAvatar>();
|
||||
List<CVRSpawnable> spawnables = new List<CVRSpawnable>();
|
||||
List<CVRWorld> worlds = new List<CVRWorld>();
|
||||
|
||||
foreach (CVRWorld w in Resources.FindObjectsOfTypeAll<CVRWorld>())
|
||||
{
|
||||
if (w.gameObject.activeInHierarchy) worlds.Add(w);
|
||||
}
|
||||
|
||||
foreach (CVRSpawnable s in Resources.FindObjectsOfTypeAll<CVRSpawnable>())
|
||||
{
|
||||
if (s.gameObject.activeInHierarchy) spawnables.Add(s);
|
||||
}
|
||||
|
||||
foreach (CVRAvatar a in Resources.FindObjectsOfTypeAll<CVRAvatar>())
|
||||
{
|
||||
if (a.gameObject.activeInHierarchy) avatars.Add(a);
|
||||
}
|
||||
|
||||
if (worlds.Count <= 0 && avatars.Count > 0 && SupportedUnityVersions.Contains(Application.unityVersion))
|
||||
{
|
||||
if (avatars.Count <= 0) EditorGUILayout.LabelField(CCKLocalizationProvider.GetLocalizedText("ABI_UI_BUILDPANEL_UPLOADER_NO_AVATARS_FOUND"));
|
||||
else
|
||||
{
|
||||
if (avatars.Count > 0)
|
||||
{
|
||||
var counter = 0;
|
||||
scrollPosAvatar = EditorGUILayout.BeginScrollView(scrollPosAvatar);
|
||||
foreach (CVRAvatar a in avatars)
|
||||
{
|
||||
counter++;
|
||||
EditorGUI.BeginChangeCheck();
|
||||
EditorGUILayout.Space();
|
||||
GUILayout.Label("Avatar Object #" + counter);
|
||||
OnGUIAvatar(a);
|
||||
}
|
||||
|
||||
EditorGUILayout.EndScrollView();
|
||||
}
|
||||
}
|
||||
}
|
||||
if (worlds.Count <= 0 && spawnables.Count > 0 && SupportedUnityVersions.Contains(Application.unityVersion))
|
||||
{
|
||||
if (spawnables.Count <= 0) EditorGUILayout.LabelField(CCKLocalizationProvider.GetLocalizedText("ABI_UI_BUILDPANEL_UPLOADER_NO_SPAWNABLES_FOUND"));
|
||||
else
|
||||
{
|
||||
if (spawnables.Count > 0)
|
||||
{
|
||||
var counter = 0;
|
||||
scrollPosSpawnable = EditorGUILayout.BeginScrollView(scrollPosSpawnable);
|
||||
foreach (CVRSpawnable s in spawnables)
|
||||
{
|
||||
counter++;
|
||||
EditorGUI.BeginChangeCheck();
|
||||
EditorGUILayout.Space();
|
||||
GUILayout.Label("Spawnable Object #" + counter);
|
||||
OnGUISpawnable(s);
|
||||
}
|
||||
|
||||
EditorGUILayout.EndScrollView();
|
||||
}
|
||||
}
|
||||
}
|
||||
if (avatars.Count <= 0 && worlds.Count == 1 && SupportedUnityVersions.Contains(Application.unityVersion))
|
||||
{
|
||||
int errors = 0;
|
||||
int overallMissingScripts = 0;
|
||||
|
||||
overallMissingScripts = CCK_Tools.CleanMissingScripts(CCK_Tools.SearchType.Scene , false, null);
|
||||
if (overallMissingScripts > 0) errors++;
|
||||
|
||||
EditorGUILayout.HelpBox(CCKLocalizationProvider.GetLocalizedText("ABI_UI_INFOTEXT_WORLDS_NO_AVATARS"), MessageType.Info);
|
||||
|
||||
//Error
|
||||
if (overallMissingScripts > 0) EditorGUILayout.HelpBox(CCKLocalizationProvider.GetLocalizedText("ABI_UI_BUILDPANEL_ERROR_WORLD_MISSING_SCRIPTS"), MessageType.Error);
|
||||
|
||||
//Warning
|
||||
if (worlds[0].spawns.Length == 0) EditorGUILayout.HelpBox(CCKLocalizationProvider.GetLocalizedText("ABI_UI_BUILDPANEL_WORLDS_WARNING_SPAWNPOINT"), MessageType.Warning);
|
||||
|
||||
//Info
|
||||
if (worlds[0].referenceCamera == null) EditorGUILayout.HelpBox(CCKLocalizationProvider.GetLocalizedText("ABI_UI_BUILDPANEL_WORLDS_INFO_REFERENCE_CAMERA"), MessageType.Info);
|
||||
if (worlds[0].respawnHeightY <= -500) EditorGUILayout.HelpBox(CCKLocalizationProvider.GetLocalizedText("ABI_UI_BUILDPANEL_WORLDS_INFO_RESPAWN_HEIGHT"), MessageType.Info);
|
||||
|
||||
if (GUILayout.Button(CCKLocalizationProvider.GetLocalizedText("ABI_UI_BUILDPANEL_UPLOAD_WORLD_BUTTON")) && errors <= 0)
|
||||
{
|
||||
CCK_BuildUtility.BuildAndUploadMapAsset(EditorSceneManager.GetActiveScene(), worlds[0].gameObject);
|
||||
}
|
||||
if (overallMissingScripts > 0) if (GUILayout.Button(CCKLocalizationProvider.GetLocalizedText("ABI_UI_BUILDPANEL_UTIL_REMOVE_MISSING_SCRIPTS_BUTTON"))) CCK_Tools.CleanMissingScripts(CCK_Tools.SearchType.Scene , true, null);
|
||||
}
|
||||
if (avatars.Count <= 0 && worlds.Count > 1 && SupportedUnityVersions.Contains(Application.unityVersion))
|
||||
{
|
||||
EditorGUILayout.HelpBox(CCKLocalizationProvider.GetLocalizedText("ABI_UI_BUILDPANEL_WORLDS_ERROR_MULTIPLE_CVR_WORLD"), MessageType.Error);
|
||||
}
|
||||
if (avatars.Count > 0 && worlds.Count > 0 && SupportedUnityVersions.Contains(Application.unityVersion))
|
||||
{
|
||||
EditorGUILayout.HelpBox(CCKLocalizationProvider.GetLocalizedText("ABI_UI_BUILDPANEL_WORLDS_ERROR_WORLD_CONTAINS_AVATAR"), MessageType.Error);
|
||||
}
|
||||
if (avatars.Count <= 0 && worlds.Count <= 0 && SupportedUnityVersions.Contains(Application.unityVersion))
|
||||
{
|
||||
EditorGUILayout.HelpBox(CCKLocalizationProvider.GetLocalizedText("ABI_UI_BUILDPANEL_WORLDS_ERROR_NO_CONTENT"), MessageType.Info);
|
||||
}
|
||||
if (!SupportedUnityVersions.Contains(Application.unityVersion))
|
||||
{
|
||||
EditorGUILayout.HelpBox(CCKLocalizationProvider.GetLocalizedText("ABI_UI_BUILDPANEL_WORLDS_ERROR_UNITY_UNSUPPORTED"), MessageType.Error);
|
||||
}
|
||||
}
|
||||
|
||||
void Tab_Settings()
|
||||
{
|
||||
EditorGUILayout.LabelField(CCKLocalizationProvider.GetLocalizedText("ABI_UI_BUILDPANEL_SETTINGS_HEADER"), EditorStyles.boldLabel);
|
||||
EditorGUILayout.Space();
|
||||
|
||||
EditorGUILayout.BeginHorizontal();
|
||||
|
||||
EditorGUILayout.BeginVertical();
|
||||
EditorGUILayout.LabelField(CCKLocalizationProvider.GetLocalizedText("ABI_UI_BUILDPANEL_SETTINGS_CONTENT_REGION"));
|
||||
EditorGUILayout.EndVertical();
|
||||
|
||||
EditorGUILayout.BeginVertical();
|
||||
var region = EditorGUILayout.Popup(EditorPrefs.GetInt("ABI_PREF_UPLOAD_REGION", 0), new []{"Europe", "United States", "Asia"});
|
||||
EditorPrefs.SetInt("ABI_PREF_UPLOAD_REGION", region);
|
||||
EditorGUILayout.EndVertical();
|
||||
|
||||
EditorGUILayout.EndHorizontal();
|
||||
|
||||
EditorGUILayout.HelpBox(CCKLocalizationProvider.GetLocalizedText("ABI_UI_BUILDPANEL_SETTINGS_HINT_CONTENT_REGION"), MessageType.Info);
|
||||
|
||||
EditorGUILayout.Space();
|
||||
|
||||
EditorGUILayout.BeginHorizontal();
|
||||
|
||||
EditorGUILayout.BeginVertical();
|
||||
EditorGUILayout.LabelField(CCKLocalizationProvider.GetLocalizedText("ABI_UI_BUILDPANEL_SETTINGS_CCK_LANGUAGE"));
|
||||
EditorGUILayout.EndVertical();
|
||||
|
||||
EditorGUILayout.BeginVertical();
|
||||
string selectedLanguage = EditorPrefs.GetString("ABI_CCKLocals", "English");
|
||||
int selectedIndex = CCKLocalizationProvider.GetKnownLanguages().FindIndex(match => match == selectedLanguage);
|
||||
if (selectedIndex < 0) selectedIndex = 0;
|
||||
selectedIndex = EditorGUILayout.Popup(selectedIndex, CCKLocalizationProvider.GetKnownLanguages().ToArray());
|
||||
EditorPrefs.SetString("ABI_CCKLocals", CCKLocalizationProvider.GetKnownLanguages()[selectedIndex]);
|
||||
EditorGUILayout.EndVertical();
|
||||
|
||||
EditorGUILayout.EndHorizontal();
|
||||
|
||||
EditorGUILayout.HelpBox(CCKLocalizationProvider.GetLocalizedText("ABI_UI_BUILDPANEL_SETTINGS_HINT_CCK_LANGUAGE"), MessageType.Info);
|
||||
|
||||
EditorGUILayout.Space();
|
||||
}
|
||||
|
||||
void OnGUIAvatar(CVRAvatar avatar)
|
||||
{
|
||||
GameObject avatarObject = avatar.gameObject;
|
||||
GUI.enabled = true;
|
||||
EditorGUILayout.InspectorTitlebar(avatarObject.activeInHierarchy, avatarObject);
|
||||
int errors = 0;
|
||||
int overallPolygonsCount = 0;
|
||||
int overallSkinnedMeshRenderer = 0;
|
||||
int overallUniqueMaterials = 0;
|
||||
int overallMissingScripts = 0;
|
||||
foreach (MeshFilter filter in avatar.gameObject.GetComponentsInChildren<MeshFilter>())
|
||||
{
|
||||
if (filter.sharedMesh != null) overallPolygonsCount = overallPolygonsCount + filter.sharedMesh.triangles.Length / 3;
|
||||
}
|
||||
foreach (SkinnedMeshRenderer renderer in avatar.gameObject.GetComponentsInChildren<SkinnedMeshRenderer>())
|
||||
{
|
||||
overallSkinnedMeshRenderer++;
|
||||
if (renderer.sharedMaterials != null) overallUniqueMaterials = overallUniqueMaterials + renderer.sharedMaterials.Length;
|
||||
}
|
||||
overallMissingScripts = CCK_Tools.CleanMissingScripts(CCK_Tools.SearchType.Selection ,false,avatarObject);
|
||||
if (overallMissingScripts > 0) errors++;
|
||||
|
||||
//Errors
|
||||
if (overallMissingScripts > 0) EditorGUILayout.HelpBox(CCKLocalizationProvider.GetLocalizedText("ABI_UI_BUILDPANEL_ERROR_AVATAR_MISSING_SCRIPTS"), MessageType.Error);
|
||||
var animator = avatar.GetComponent<Animator>();
|
||||
if (animator == null)
|
||||
{
|
||||
errors++;
|
||||
EditorGUILayout.HelpBox(CCKLocalizationProvider.GetLocalizedText("ABI_UI_BUILDPANEL_AVATAR_ERROR_ANIMATOR"), MessageType.Error);
|
||||
}
|
||||
if (animator != null && animator.avatar == null)
|
||||
{
|
||||
//errors++;
|
||||
EditorGUILayout.HelpBox(CCKLocalizationProvider.GetLocalizedText("ABI_UI_BUILDPANEL_AVATAR_WARNING_GENERIC"), MessageType.Warning);
|
||||
}
|
||||
|
||||
//Warnings
|
||||
if (overallPolygonsCount > 100000) EditorGUILayout.HelpBox(CCKLocalizationProvider.GetLocalizedText("ABI_UI_BUILDPANEL_AVATAR_WARNING_POLYGONS").Replace("{X}", overallPolygonsCount.ToString()), MessageType.Warning);
|
||||
if (overallSkinnedMeshRenderer > 10) EditorGUILayout.HelpBox(CCKLocalizationProvider.GetLocalizedText("ABI_UI_BUILDPANEL_AVATAR_WARNING_SKINNED_MESH_RENDERERS").Replace("{X}", overallSkinnedMeshRenderer.ToString()), MessageType.Warning);
|
||||
if (overallUniqueMaterials > 20) EditorGUILayout.HelpBox(CCKLocalizationProvider.GetLocalizedText("ABI_UI_BUILDPANEL_AVATAR_WARNING_MATERIALS").Replace("{X}", overallUniqueMaterials.ToString()), MessageType.Warning);
|
||||
if (avatar.viewPosition == Vector3.zero) EditorGUILayout.HelpBox(CCKLocalizationProvider.GetLocalizedText("ABI_UI_BUILDPANEL_AVATAR_WARNING_VIEWPOINT"), MessageType.Warning);
|
||||
if (animator != null && animator.avatar != null && !animator.avatar.isHuman) EditorGUILayout.HelpBox(CCKLocalizationProvider.GetLocalizedText("ABI_UI_BUILDPANEL_AVATAR_WARNING_NON_HUMANOID"), MessageType.Warning);
|
||||
|
||||
var avatarMeshes = getAllAssetMeshesInAvatar(avatarObject);
|
||||
if (CheckForLegacyBlendShapeNormals(avatarMeshes))
|
||||
{
|
||||
EditorGUILayout.HelpBox(CCKLocalizationProvider.GetLocalizedText("ABI_UI_BUILDPANEL_AVATAR_WARNING_LEGACY_BLENDSHAPES"), MessageType.Warning);
|
||||
if(GUILayout.Button(CCKLocalizationProvider.GetLocalizedText("ABI_UI_BUILDPANEL_FIX_IMPORT_SETTINGS")))
|
||||
{
|
||||
FixLegacyBlendShapeNormals(avatarMeshes);
|
||||
}
|
||||
}
|
||||
|
||||
//Info
|
||||
if (overallPolygonsCount >= 50000 && overallPolygonsCount <= 100000) EditorGUILayout.HelpBox(CCKLocalizationProvider.GetLocalizedText("ABI_UI_BUILDPANEL_AVATAR_INFO_POLYGONS").Replace("{X}", overallPolygonsCount.ToString()), MessageType.Info);
|
||||
if (overallSkinnedMeshRenderer >= 5 && overallSkinnedMeshRenderer <= 10) EditorGUILayout.HelpBox(CCKLocalizationProvider.GetLocalizedText("ABI_UI_BUILDPANEL_AVATAR_INFO_SKINNED_MESH_RENDERERS").Replace("{X}", overallSkinnedMeshRenderer.ToString()), MessageType.Info);
|
||||
if (overallUniqueMaterials >= 10 && overallUniqueMaterials <= 20) EditorGUILayout.HelpBox(CCKLocalizationProvider.GetLocalizedText("ABI_UI_BUILDPANEL_AVATAR_INFO_MATERIALS").Replace("{X}", overallUniqueMaterials.ToString()), MessageType.Info);
|
||||
if (avatar.viewPosition.y <= 0.5f) EditorGUILayout.HelpBox(CCKLocalizationProvider.GetLocalizedText("ABI_UI_BUILDPANEL_AVATAR_INFO_SMALL"), MessageType.Info);
|
||||
if (avatar.viewPosition.y > 3f) EditorGUILayout.HelpBox(CCKLocalizationProvider.GetLocalizedText("ABI_UI_BUILDPANEL_AVATAR_INFO_HUGE"), MessageType.Info);
|
||||
|
||||
if (errors <= 0) if (GUILayout.Button(CCKLocalizationProvider.GetLocalizedText("ABI_UI_BUILDPANEL_AVATAR_UPLOAD_BUTTON"))) CCK_BuildUtility.BuildAndUploadAvatar(avatarObject);
|
||||
if (overallMissingScripts > 0) if (GUILayout.Button(CCKLocalizationProvider.GetLocalizedText("ABI_UI_BUILDPANEL_UTIL_REMOVE_MISSING_SCRIPTS_BUTTON"))) CCK_Tools.CleanMissingScripts(CCK_Tools.SearchType.Selection ,true,avatarObject);
|
||||
|
||||
}
|
||||
|
||||
void OnGUISpawnable(CVRSpawnable s)
|
||||
{
|
||||
GameObject spawnableObject = s.gameObject;
|
||||
GUI.enabled = true;
|
||||
EditorGUILayout.InspectorTitlebar(spawnableObject.activeInHierarchy, spawnableObject);
|
||||
int errors = 0;
|
||||
int overallPolygonsCount = 0;
|
||||
int overallSkinnedMeshRenderer = 0;
|
||||
int overallUniqueMaterials = 0;
|
||||
int overallMissingScripts = 0;
|
||||
foreach (MeshFilter filter in s.gameObject.GetComponentsInChildren<MeshFilter>())
|
||||
{
|
||||
if (filter.sharedMesh != null) overallPolygonsCount = overallPolygonsCount + filter.sharedMesh.triangles.Length / 3;
|
||||
}
|
||||
foreach (SkinnedMeshRenderer renderer in s.gameObject.GetComponentsInChildren<SkinnedMeshRenderer>())
|
||||
{
|
||||
overallSkinnedMeshRenderer++;
|
||||
if (renderer.sharedMaterials != null) overallUniqueMaterials = overallUniqueMaterials + renderer.sharedMaterials.Length;
|
||||
}
|
||||
overallMissingScripts = CCK_Tools.CleanMissingScripts(CCK_Tools.SearchType.Selection ,false, spawnableObject);
|
||||
if (overallMissingScripts > 0) errors++;
|
||||
|
||||
//Errors
|
||||
if (overallMissingScripts > 0) EditorGUILayout.HelpBox(CCKLocalizationProvider.GetLocalizedText("ABI_UI_BUILDPANEL_PROPS_ERROR_MISSING_SCRIPT"), MessageType.Error);
|
||||
|
||||
//Warnings
|
||||
if (overallPolygonsCount > 100000) EditorGUILayout.HelpBox(CCKLocalizationProvider.GetLocalizedText("ABI_UI_BUILDPANEL_PROPS_WARNING_POLYGONS").Replace("{X}", overallPolygonsCount.ToString()), MessageType.Warning);
|
||||
if (overallSkinnedMeshRenderer > 10) EditorGUILayout.HelpBox(CCKLocalizationProvider.GetLocalizedText("ABI_UI_BUILDPANEL_PROPS_WARNING_SKINNED_MESH_RENDERERS").Replace("{X}", overallSkinnedMeshRenderer.ToString()), MessageType.Warning);
|
||||
if (overallUniqueMaterials > 20) EditorGUILayout.HelpBox(CCKLocalizationProvider.GetLocalizedText("ABI_UI_BUILDPANEL_PROPS_WARNING_MATERIALS").Replace("{X}", overallUniqueMaterials.ToString()), MessageType.Warning);
|
||||
|
||||
var spawnableMeshes = getAllAssetMeshesInAvatar(spawnableObject);
|
||||
if (CheckForLegacyBlendShapeNormals(spawnableMeshes))
|
||||
{
|
||||
EditorGUILayout.HelpBox(CCKLocalizationProvider.GetLocalizedText("ABI_UI_BUILDPANEL_PROPS_WARNING_LEGACY_BLENDSHAPES"), MessageType.Warning);
|
||||
if(GUILayout.Button(CCKLocalizationProvider.GetLocalizedText("ABI_UI_BUILDPANEL_FIX_IMPORT_SETTINGS")))
|
||||
{
|
||||
FixLegacyBlendShapeNormals(spawnableMeshes);
|
||||
}
|
||||
}
|
||||
|
||||
//Info
|
||||
if (overallPolygonsCount >= 50000 && overallPolygonsCount <= 100000) EditorGUILayout.HelpBox(CCKLocalizationProvider.GetLocalizedText("ABI_UI_BUILDPANEL_PROPS_INFO_POLYGONS").Replace("{X}", overallPolygonsCount.ToString()), MessageType.Info);
|
||||
if (overallSkinnedMeshRenderer >= 5 && overallSkinnedMeshRenderer <= 10) EditorGUILayout.HelpBox(CCKLocalizationProvider.GetLocalizedText("ABI_UI_BUILDPANEL_PROPS_INFO_SKINNED_MESH_RENDERERS").Replace("{X}", overallSkinnedMeshRenderer.ToString()), MessageType.Info);
|
||||
if (overallUniqueMaterials >= 10 && overallUniqueMaterials <= 20) EditorGUILayout.HelpBox(CCKLocalizationProvider.GetLocalizedText("ABI_UI_BUILDPANEL_PROPS_INFO_MATERIALS").Replace("{X}", overallUniqueMaterials.ToString()), MessageType.Info);
|
||||
|
||||
if (errors <= 0 && overallMissingScripts <= 0) if (GUILayout.Button(CCKLocalizationProvider.GetLocalizedText("ABI_UI_BUILDPANEL_PROPS_UPLOAD_BUTTON"))) CCK_BuildUtility.BuildAndUploadSpawnable(spawnableObject);
|
||||
if (overallMissingScripts > 0) if (GUILayout.Button(CCKLocalizationProvider.GetLocalizedText("ABI_UI_BUILDPANEL_UTIL_REMOVE_MISSING_SCRIPTS_BUTTON"))) CCK_Tools.CleanMissingScripts(CCK_Tools.SearchType.Selection ,true, spawnableObject);
|
||||
}
|
||||
|
||||
private List<String> getAllAssetMeshesInAvatar(GameObject avatar)
|
||||
{
|
||||
var assetPathList = new List<String>();
|
||||
|
||||
foreach (var sMeshRenderer in avatar.GetComponentsInChildren<SkinnedMeshRenderer>(true))
|
||||
{
|
||||
if(sMeshRenderer == null)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
var currentMesh = sMeshRenderer.sharedMesh;
|
||||
|
||||
if(currentMesh == null)
|
||||
{
|
||||
Debug.LogWarning(CCKLocalizationProvider.GetLocalizedText("ABI_UI_BUILDPANEL_WARNING_MESH_FILTER_MESH_EMPTY") + $": {sMeshRenderer.transform.name}");
|
||||
continue;
|
||||
}
|
||||
|
||||
if(!AssetDatabase.Contains(currentMesh))
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
string meshAssetPath = AssetDatabase.GetAssetPath(currentMesh);
|
||||
if(string.IsNullOrEmpty(meshAssetPath))
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
if (assetPathList.Contains(meshAssetPath))
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
assetPathList.Add(meshAssetPath);
|
||||
}
|
||||
|
||||
foreach (var meshFilter in avatar.GetComponentsInChildren<MeshFilter>(true))
|
||||
{
|
||||
if(meshFilter == null)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
var currentMesh = meshFilter.sharedMesh;
|
||||
|
||||
if(currentMesh == null)
|
||||
{
|
||||
Debug.LogWarning(CCKLocalizationProvider.GetLocalizedText("ABI_UI_BUILDPANEL_WARNING_MESH_FILTER_MESH_EMPTY") + $": {meshFilter.transform.name}");
|
||||
continue;
|
||||
}
|
||||
|
||||
if(!AssetDatabase.Contains(currentMesh))
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
string meshAssetPath = AssetDatabase.GetAssetPath(currentMesh);
|
||||
if(string.IsNullOrEmpty(meshAssetPath))
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
if (assetPathList.Contains(meshAssetPath))
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
assetPathList.Add(meshAssetPath);
|
||||
}
|
||||
|
||||
foreach (var pRenderer in avatar.GetComponentsInChildren<ParticleSystemRenderer>(true))
|
||||
{
|
||||
if(pRenderer == null)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
var particleMeshes = new Mesh[pRenderer.meshCount];
|
||||
pRenderer.GetMeshes(particleMeshes);
|
||||
|
||||
foreach (var particleMesh in particleMeshes)
|
||||
{
|
||||
if(particleMesh == null)
|
||||
{
|
||||
Debug.LogWarning(CCKLocalizationProvider.GetLocalizedText("ABI_UI_BUILDPANEL_WARNING_MESH_FILTER_MESH_EMPTY") + $": {pRenderer.transform.name}");
|
||||
continue;
|
||||
}
|
||||
|
||||
if(!AssetDatabase.Contains(particleMesh))
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
string meshAssetPath = AssetDatabase.GetAssetPath(particleMesh);
|
||||
if(string.IsNullOrEmpty(meshAssetPath))
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
if (assetPathList.Contains(meshAssetPath))
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
assetPathList.Add(meshAssetPath);
|
||||
}
|
||||
}
|
||||
|
||||
return assetPathList;
|
||||
}
|
||||
|
||||
private bool CheckForLegacyBlendShapeNormals(List<String> assetPaths)
|
||||
{
|
||||
foreach (var assetPath in assetPaths)
|
||||
{
|
||||
|
||||
var modelImporter = AssetImporter.GetAtPath(assetPath) as ModelImporter;
|
||||
if(modelImporter == null)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
if(modelImporter.importBlendShapeNormals != ModelImporterNormals.Calculate)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
if((bool)legacyBlendShapeImporter.GetValue(modelImporter))
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
private void FixLegacyBlendShapeNormals(List<String> assetPaths)
|
||||
{
|
||||
foreach (var assetPath in assetPaths)
|
||||
{
|
||||
var modelImporter = AssetImporter.GetAtPath(assetPath) as ModelImporter;
|
||||
if(modelImporter == null)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
if(modelImporter.importBlendShapeNormals != ModelImporterNormals.Calculate)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
legacyBlendShapeImporter.SetValue(modelImporter, true);
|
||||
modelImporter.SaveAndReimport();
|
||||
}
|
||||
}
|
||||
|
||||
private void EditorUpdate()
|
||||
{
|
||||
/*if (!_attemptingToLogin || _webRequest is null || !_webRequest.isDone) return;
|
||||
|
||||
if (_webRequest.isNetworkError || _webRequest.isHttpError)
|
||||
{
|
||||
Debug.LogError("[ABI:CCK] Web Request Error while trying to authenticate.");
|
||||
return;
|
||||
}
|
||||
|
||||
var result = _webRequest.downloadHandler.text;
|
||||
if (string.IsNullOrEmpty(result)) return;
|
||||
|
||||
LoginResponse usr = Abi.Newtonsoft.Json.JsonConvert.DeserializeObject<LoginResponse>(result);
|
||||
if (usr == null) return;
|
||||
|
||||
if (usr.IsValidCredential)
|
||||
{
|
||||
_apiUserRank = usr.UserRank;
|
||||
Debug.Log("[ABI:CCK] Successfully authenticated as " + _username + " using AlphaLink Public API.");
|
||||
EditorPrefs.SetString("m_ABI_Username", _username);
|
||||
EditorPrefs.SetString("m_ABI_Key", _key);
|
||||
_loggedIn = true;
|
||||
_hasAttemptedToLogin = false;
|
||||
}
|
||||
else
|
||||
{
|
||||
Debug.Log("[ABI:CCK] Unable to authenticate using provided credentials. API responded with: " + usr.ApiMessage + ".");
|
||||
_loggedIn = false;
|
||||
_hasAttemptedToLogin = true;
|
||||
_username = _key = string.Empty;
|
||||
}
|
||||
|
||||
_webRequest = null;
|
||||
_attemptingToLogin = false;*/
|
||||
}
|
||||
|
||||
private void Logout()
|
||||
{
|
||||
_loggedIn = false;
|
||||
_username = _key = string.Empty;
|
||||
EditorPrefs.SetString("m_ABI_Username", _username);
|
||||
EditorPrefs.SetString("m_ABI_Key", _key);
|
||||
}
|
||||
|
||||
public async Task Login()
|
||||
{
|
||||
if (!_attemptingToLogin)
|
||||
{
|
||||
_attemptingToLogin = true;
|
||||
|
||||
using (HttpClient httpclient = new HttpClient())
|
||||
{
|
||||
HttpResponseMessage response;
|
||||
response = await httpclient.PostAsync(
|
||||
"https://api.abinteractive.net/1/cck/validateKey",
|
||||
new StringContent(JsonConvert.SerializeObject(new {Username = _username, AccessKey = _key}),
|
||||
Encoding.UTF8, "application/json")
|
||||
);
|
||||
|
||||
if (response.IsSuccessStatusCode)
|
||||
{
|
||||
string result = await response.Content.ReadAsStringAsync();
|
||||
BaseResponse<LoginResponse> usr = Abi.Newtonsoft.Json.JsonConvert.DeserializeObject<BaseResponse<LoginResponse>>(result);
|
||||
|
||||
if (usr == null || usr.Data == null) return;
|
||||
|
||||
if (usr.Data.isValidCredentials)
|
||||
{
|
||||
_apiUserRank = usr.Data.userRank;
|
||||
Debug.Log("[ABI:CCK] Successfully authenticated as " + _username + " using AlphaLink Public API.");
|
||||
EditorPrefs.SetString("m_ABI_Username", _username);
|
||||
EditorPrefs.SetString("m_ABI_Key", _key);
|
||||
_loggedIn = true;
|
||||
_hasAttemptedToLogin = false;
|
||||
}
|
||||
else
|
||||
{
|
||||
Debug.Log("[ABI:CCK] Unable to authenticate using provided credentials. API responded with: " + usr.Message + ".");
|
||||
_loggedIn = false;
|
||||
_hasAttemptedToLogin = true;
|
||||
_username = _key = string.Empty;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
Debug.LogError("[ABI:CCK] Web Request Error while trying to authenticate.");
|
||||
}
|
||||
}
|
||||
_attemptingToLogin = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public class LoginResponse
|
||||
{
|
||||
public bool isValidCredentials { get; set; }
|
||||
public bool isAccountUnlocked { get; set; }
|
||||
public string userId { get; set; }
|
||||
public string userRank { get; set; }
|
||||
}
|
||||
|
||||
public class BaseResponse<T>
|
||||
{
|
||||
public string Message { get; set; }
|
||||
public T Data { get; set; }
|
||||
|
||||
public BaseResponse(string message = null, T data = default)
|
||||
{
|
||||
Message = message;
|
||||
Data = data;
|
||||
}
|
||||
|
||||
public override string ToString()
|
||||
{
|
||||
return JsonConvert.SerializeObject(this);
|
||||
}
|
||||
}
|
||||
}
|
11
Assets/ABI.CCK/Scripts/Editor/CCK_BuildManagerWindow.cs.meta
Executable file
11
Assets/ABI.CCK/Scripts/Editor/CCK_BuildManagerWindow.cs.meta
Executable file
|
@ -0,0 +1,11 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 6256dd53c6120f64886f6a899d82f4d0
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
293
Assets/ABI.CCK/Scripts/Editor/CCK_BuildUtility.cs
Executable file
293
Assets/ABI.CCK/Scripts/Editor/CCK_BuildUtility.cs
Executable file
|
@ -0,0 +1,293 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using ABI.CCK.Components;
|
||||
using UnityEditor;
|
||||
using UnityEditor.SceneManagement;
|
||||
using UnityEngine;
|
||||
using UnityEngine.Events;
|
||||
using UnityEngine.SceneManagement;
|
||||
|
||||
namespace ABI.CCK.Scripts.Editor
|
||||
{
|
||||
public class CCK_BuildUtility
|
||||
{
|
||||
public static PreAvatarBundleEvent PreAvatarBundleEvent = new PreAvatarBundleEvent();
|
||||
public static PrePropBundleEvent PrePropBundleEvent = new PrePropBundleEvent();
|
||||
|
||||
public static void BuildAndUploadAvatar(GameObject avatarObject)
|
||||
{
|
||||
//GameObject avatarCopy = null;
|
||||
var origInfo = avatarObject.GetComponent<CVRAssetInfo>();
|
||||
|
||||
/*try
|
||||
{
|
||||
avatarCopy = GameObject.Instantiate(avatarObject);
|
||||
PrefabUtility.UnpackPrefabInstance(avatarCopy, PrefabUnpackMode.Completely, InteractionMode.UserAction);
|
||||
Debug.Log("[CCK:BuildUtility] To prevent problems, the prefab has been unpacked. Your game object is no longer linked to the prefab instance.");
|
||||
}
|
||||
catch
|
||||
{
|
||||
Debug.Log("[CCK:BuildUtility] Object is not a prefab. No need to unpack.");
|
||||
}*/
|
||||
|
||||
//CVRAssetInfo info = avatarCopy.GetComponent<CVRAssetInfo>();
|
||||
if (string.IsNullOrEmpty(origInfo.objectId))
|
||||
{
|
||||
origInfo.objectId = Guid.NewGuid().ToString();
|
||||
//origInfo.guid = info.guid;
|
||||
try
|
||||
{
|
||||
PrefabUtility.ApplyPrefabInstance(avatarObject, InteractionMode.UserAction);
|
||||
}
|
||||
catch
|
||||
{
|
||||
Debug.Log("[CCK:BuildUtility] Object is not a prefab. No need to Apply To Instance.");
|
||||
}
|
||||
}
|
||||
|
||||
PreAvatarBundleEvent.Invoke(avatarObject);
|
||||
|
||||
EditorSceneManager.MarkSceneDirty(EditorSceneManager.GetActiveScene());
|
||||
|
||||
EditorSceneManager.SaveScene(EditorSceneManager.GetActiveScene());
|
||||
|
||||
PrefabUtility.SaveAsPrefabAsset(avatarObject, "Assets/ABI.CCK/Resources/Cache/_CVRAvatar.prefab");
|
||||
//GameObject.DestroyImmediate(avatarCopy);
|
||||
|
||||
EditorSceneManager.MarkSceneDirty(EditorSceneManager.GetActiveScene());
|
||||
|
||||
EditorSceneManager.SaveScene(EditorSceneManager.GetActiveScene());
|
||||
|
||||
AssetBundleBuild assetBundleBuild = new AssetBundleBuild();
|
||||
assetBundleBuild.assetNames = new[] {"Assets/ABI.CCK/Resources/Cache/_CVRAvatar.prefab"};
|
||||
assetBundleBuild.assetBundleName = "bundle.cvravatar";
|
||||
|
||||
BuildPipeline.BuildAssetBundles(Application.persistentDataPath, new[] {assetBundleBuild},
|
||||
BuildAssetBundleOptions.None, EditorUserBuildSettings.activeBuildTarget);
|
||||
|
||||
AssetDatabase.Refresh();
|
||||
|
||||
EditorPrefs.SetBool("m_ABI_isBuilding", true);
|
||||
EditorApplication.isPlaying = true;
|
||||
}
|
||||
|
||||
public static void BuildAndUploadSpawnable(GameObject s)
|
||||
{
|
||||
GameObject sCopy = null;
|
||||
var origInfo = s.GetComponent<CVRAssetInfo>();
|
||||
var spawnable = s.GetComponent<CVRSpawnable>();
|
||||
spawnable.spawnableType = CVRSpawnable.SpawnableType.StandaloneSpawnable;
|
||||
|
||||
PrePropBundleEvent.Invoke(s);
|
||||
|
||||
try
|
||||
{
|
||||
sCopy = GameObject.Instantiate(s);
|
||||
PrefabUtility.UnpackPrefabInstance(sCopy, PrefabUnpackMode.Completely, InteractionMode.UserAction);
|
||||
Debug.Log("[CCK:BuildUtility] To prevent problems, the prefab has been unpacked. Your game object is no longer linked to the prefab instance.");
|
||||
}
|
||||
catch
|
||||
{
|
||||
Debug.Log("[CCK:BuildUtility] Object is not a prefab. No need to unpack.");
|
||||
}
|
||||
|
||||
CVRAssetInfo info = sCopy.GetComponent<CVRAssetInfo>();
|
||||
if (string.IsNullOrEmpty(info.objectId))
|
||||
{
|
||||
info.objectId = Guid.NewGuid().ToString();
|
||||
origInfo.objectId = info.objectId;
|
||||
try
|
||||
{
|
||||
PrefabUtility.ApplyPrefabInstance(s, InteractionMode.UserAction);
|
||||
}
|
||||
catch
|
||||
{
|
||||
Debug.Log("[CCK:BuildUtility] Object is not a prefab. No need to Apply To Instance.");
|
||||
}
|
||||
}
|
||||
|
||||
EditorSceneManager.MarkSceneDirty(EditorSceneManager.GetActiveScene());
|
||||
|
||||
EditorSceneManager.SaveScene(EditorSceneManager.GetActiveScene());
|
||||
|
||||
PrefabUtility.SaveAsPrefabAsset(sCopy, "Assets/ABI.CCK/Resources/Cache/_CVRSpawnable.prefab");
|
||||
GameObject.DestroyImmediate(sCopy);
|
||||
|
||||
EditorSceneManager.MarkSceneDirty(EditorSceneManager.GetActiveScene());
|
||||
|
||||
EditorSceneManager.SaveScene(EditorSceneManager.GetActiveScene());
|
||||
|
||||
AssetBundleBuild assetBundleBuild = new AssetBundleBuild();
|
||||
assetBundleBuild.assetNames = new[] {"Assets/ABI.CCK/Resources/Cache/_CVRSpawnable.prefab"};
|
||||
assetBundleBuild.assetBundleName = "bundle.cvrprop";
|
||||
|
||||
BuildPipeline.BuildAssetBundles(Application.persistentDataPath, new[] {assetBundleBuild},
|
||||
BuildAssetBundleOptions.None, EditorUserBuildSettings.activeBuildTarget);
|
||||
|
||||
AssetDatabase.Refresh();
|
||||
|
||||
EditorPrefs.SetBool("m_ABI_isBuilding", true);
|
||||
EditorApplication.isPlaying = true;
|
||||
}
|
||||
|
||||
public static void BuildAndUploadMapAsset(Scene scene, GameObject descriptor)
|
||||
{
|
||||
SetupNetworkUUIDs();
|
||||
|
||||
EditorSceneManager.MarkSceneDirty(scene);
|
||||
|
||||
EditorSceneManager.SaveScene(EditorSceneManager.GetActiveScene());
|
||||
|
||||
CVRAssetInfo info = descriptor.GetComponent<CVRAssetInfo>();
|
||||
if (string.IsNullOrEmpty(info.objectId)) info.objectId = Guid.NewGuid().ToString();
|
||||
|
||||
PrefabUtility.SaveAsPrefabAsset(descriptor, "Assets/ABI.CCK/Resources/Cache/_CVRWorld.prefab");
|
||||
|
||||
AssetBundleBuild assetBundleBuild = new AssetBundleBuild();
|
||||
assetBundleBuild.assetNames = new[] {scene.path};
|
||||
assetBundleBuild.assetBundleName = "bundle.cvrworld";
|
||||
|
||||
BuildPipeline.BuildAssetBundles(Application.persistentDataPath, new[] {assetBundleBuild},
|
||||
BuildAssetBundleOptions.None, EditorUserBuildSettings.activeBuildTarget);
|
||||
|
||||
AssetDatabase.Refresh();
|
||||
|
||||
EditorPrefs.SetBool("m_ABI_isBuilding", true);
|
||||
EditorApplication.isPlaying = true;
|
||||
}
|
||||
|
||||
public static void SetupNetworkUUIDs()
|
||||
{
|
||||
CVRInteractable[] interactables = Resources.FindObjectsOfTypeAll<CVRInteractable>();
|
||||
CVRObjectSync[] objectSyncs = Resources.FindObjectsOfTypeAll<CVRObjectSync>();
|
||||
CVRVideoPlayer[] videoPlayers = Resources.FindObjectsOfTypeAll<CVRVideoPlayer>();
|
||||
|
||||
CVRSpawnable[] spawnables = Resources.FindObjectsOfTypeAll<CVRSpawnable>();
|
||||
|
||||
GameInstanceController[] gameInstances = Resources.FindObjectsOfTypeAll<GameInstanceController>();
|
||||
|
||||
GunController[] gunControllers = Resources.FindObjectsOfTypeAll<GunController>();
|
||||
|
||||
List<string> UsedGuids = new List<string>();
|
||||
|
||||
foreach (var interactable in interactables)
|
||||
{
|
||||
foreach (var action in interactable.actions)
|
||||
{
|
||||
string guid;
|
||||
do
|
||||
{
|
||||
guid = Guid.NewGuid().ToString();
|
||||
} while (!string.IsNullOrEmpty(UsedGuids.Find(match => match == guid)));
|
||||
UsedGuids.Add(guid);
|
||||
|
||||
action.guid = guid;
|
||||
}
|
||||
}
|
||||
|
||||
foreach (var objectSync in objectSyncs)
|
||||
{
|
||||
string guid;
|
||||
do
|
||||
{
|
||||
guid = Guid.NewGuid().ToString();
|
||||
} while (!string.IsNullOrEmpty(UsedGuids.Find(match => match == guid)));
|
||||
UsedGuids.Add(guid);
|
||||
|
||||
var newserializedObject = new SerializedObject(objectSync);
|
||||
newserializedObject.Update();
|
||||
SerializedProperty _guidProperty = newserializedObject.FindProperty("guid");
|
||||
_guidProperty.stringValue = guid;
|
||||
newserializedObject.ApplyModifiedProperties();
|
||||
}
|
||||
|
||||
foreach (var player in videoPlayers)
|
||||
{
|
||||
Guid res;
|
||||
if (player.playerId == null || !Guid.TryParse(player.playerId, out res))
|
||||
{
|
||||
string guid;
|
||||
do
|
||||
{
|
||||
guid = Guid.NewGuid().ToString();
|
||||
} while (!string.IsNullOrEmpty(UsedGuids.Find(match => match == guid)));
|
||||
UsedGuids.Add(guid);
|
||||
|
||||
player.playerId = guid;
|
||||
}
|
||||
}
|
||||
|
||||
foreach (var spawnable in spawnables)
|
||||
{
|
||||
string guid;
|
||||
do
|
||||
{
|
||||
guid = Guid.NewGuid().ToString();
|
||||
} while (!string.IsNullOrEmpty(UsedGuids.Find(match => match == guid)));
|
||||
|
||||
if (spawnable.preGeneratedInstanceId == "")
|
||||
{
|
||||
UsedGuids.Add(guid);
|
||||
spawnable.preGeneratedInstanceId = "ws~" + guid;
|
||||
}
|
||||
else
|
||||
{
|
||||
UsedGuids.Add(spawnable.preGeneratedInstanceId);
|
||||
}
|
||||
|
||||
spawnable.spawnableType = CVRSpawnable.SpawnableType.WorldSpawnable;
|
||||
}
|
||||
|
||||
int i = 0;
|
||||
foreach (GameInstanceController gameInstance in gameInstances)
|
||||
{
|
||||
if (gameInstance.teams.Count == 0)
|
||||
{
|
||||
var team = new Team();
|
||||
team.name = "Team";
|
||||
team.color = Color.red;
|
||||
team.playerLimit = 16;
|
||||
team.index = i;
|
||||
gameInstance.teams.Add(team);
|
||||
i++;
|
||||
}
|
||||
else
|
||||
{
|
||||
foreach (var team in gameInstance.teams)
|
||||
{
|
||||
team.index = i;
|
||||
i++;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
foreach (var gunController in gunControllers)
|
||||
{
|
||||
string guid;
|
||||
do
|
||||
{
|
||||
guid = Guid.NewGuid().ToString();
|
||||
} while (!string.IsNullOrEmpty(UsedGuids.Find(match => match == guid)));
|
||||
UsedGuids.Add(guid);
|
||||
|
||||
var newserializedObject = new SerializedObject(gunController);
|
||||
newserializedObject.Update();
|
||||
SerializedProperty _guidProperty = newserializedObject.FindProperty("referenceID");
|
||||
_guidProperty.stringValue = guid;
|
||||
newserializedObject.ApplyModifiedProperties();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
[System.Serializable]
|
||||
public class PreAvatarBundleEvent : UnityEvent<GameObject>
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
[System.Serializable]
|
||||
public class PrePropBundleEvent : UnityEvent<GameObject>
|
||||
{
|
||||
|
||||
}
|
||||
}
|
11
Assets/ABI.CCK/Scripts/Editor/CCK_BuildUtility.cs.meta
Executable file
11
Assets/ABI.CCK/Scripts/Editor/CCK_BuildUtility.cs.meta
Executable file
|
@ -0,0 +1,11 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 9e48b14602d7465469888e735bd3a915
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
395
Assets/ABI.CCK/Scripts/Editor/CCK_CVRAdvancedAvatarSettingsTriggerEditor.cs
Executable file
395
Assets/ABI.CCK/Scripts/Editor/CCK_CVRAdvancedAvatarSettingsTriggerEditor.cs
Executable file
|
@ -0,0 +1,395 @@
|
|||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using ABI.CCK.Components;
|
||||
using UnityEditor;
|
||||
using UnityEditorInternal;
|
||||
using UnityEngine;
|
||||
using AnimatorController = UnityEditor.Animations.AnimatorController;
|
||||
using AnimatorControllerParameterType = UnityEngine.AnimatorControllerParameterType;
|
||||
|
||||
namespace ABI.CCK.Scripts.Editor
|
||||
{
|
||||
[CustomEditor(typeof(CVRAdvancedAvatarSettingsTrigger))]
|
||||
public class CCK_CVRAdvancedAvatarSettingsTriggerEditor : UnityEditor.Editor
|
||||
{
|
||||
private CVRAdvancedAvatarSettingsTrigger trigger;
|
||||
private AnimatorController animator;
|
||||
private CVRAdvancedAvatarSettingsTriggerTask enterEntity;
|
||||
private CVRAdvancedAvatarSettingsTriggerTask exitEntity;
|
||||
private CVRAdvancedAvatarSettingsTriggerTaskStay stayEntity;
|
||||
private ReorderableList _onEnterList;
|
||||
private ReorderableList _onExitList;
|
||||
private ReorderableList _onStayList;
|
||||
private List<string> animatorParameters;
|
||||
|
||||
public override void OnInspectorGUI()
|
||||
{
|
||||
trigger = (CVRAdvancedAvatarSettingsTrigger) target;
|
||||
var avatar = trigger.GetComponentInParent<CVRAvatar>();
|
||||
animator = null;
|
||||
animatorParameters = new List<string>();
|
||||
animatorParameters.Add("-none-");
|
||||
|
||||
if (avatar != null && avatar.overrides != null && avatar.overrides.runtimeAnimatorController != null)
|
||||
{
|
||||
animator = (AnimatorController) avatar.overrides.runtimeAnimatorController;
|
||||
foreach (var parameter in animator.parameters)
|
||||
{
|
||||
if ((parameter.type == AnimatorControllerParameterType.Float ||
|
||||
parameter.type == AnimatorControllerParameterType.Bool ||
|
||||
parameter.type == AnimatorControllerParameterType.Int)
|
||||
&& parameter.name.Length > 0 &&
|
||||
!CCK_CVRAvatarEditor.coreParameters.Contains(parameter.name) && parameter.name.Substring(0, 1) != "#")
|
||||
{
|
||||
animatorParameters.Add(parameter.name);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
var triggers = trigger.GetComponents<CVRAdvancedAvatarSettingsTrigger>();
|
||||
|
||||
if (triggers.Length > 1)
|
||||
{
|
||||
EditorGUILayout.HelpBox(CCKLocalizationProvider.GetLocalizedText("ABI_UI_ADVAVTR_TRIGGER_MULTIPLE_TRIGGER_HELPBOX"), MessageType.Error);
|
||||
}
|
||||
|
||||
trigger.areaSize = EditorGUILayout.Vector3Field("Area Size", trigger.areaSize);
|
||||
|
||||
trigger.areaOffset = EditorGUILayout.Vector3Field("Area Offset", trigger.areaOffset);
|
||||
|
||||
if (!trigger.useAdvancedTrigger)
|
||||
{
|
||||
if (animator == null)
|
||||
{
|
||||
trigger.settingName = EditorGUILayout.TextField("Setting Name", trigger.settingName);
|
||||
}
|
||||
else
|
||||
{
|
||||
var animatorParams = animatorParameters.ToArray();
|
||||
var index = animatorParameters.FindIndex(match => match == trigger.settingName);
|
||||
index = Mathf.Max(EditorGUILayout.Popup("Setting Name", index, animatorParams), 0);
|
||||
trigger.settingName = animatorParams[index];
|
||||
}
|
||||
|
||||
|
||||
trigger.settingValue = EditorGUILayout.FloatField("Setting Value", trigger.settingValue);
|
||||
|
||||
trigger.useAdvancedTrigger = EditorGUILayout.Toggle("Enabled Advanced Mode", trigger.useAdvancedTrigger);
|
||||
}
|
||||
else
|
||||
{
|
||||
trigger.useAdvancedTrigger = EditorGUILayout.Toggle("Enabled Advanced Mode", trigger.useAdvancedTrigger);
|
||||
|
||||
var list = serializedObject.FindProperty("allowedPointer");
|
||||
EditorGUILayout.PropertyField(list, new GUIContent("Allowed Pointers"), true);
|
||||
serializedObject.ApplyModifiedProperties();
|
||||
|
||||
EditorGUILayout.HelpBox(CCKLocalizationProvider.GetLocalizedText("ABI_UI_ADVAVTR_TRIGGER_ALLOWED_POINTERS_HELPBOX"), MessageType.Info);
|
||||
|
||||
trigger.isNetworkInteractable = EditorGUILayout.Toggle("Network Interactable", trigger.isNetworkInteractable);
|
||||
|
||||
list = serializedObject.FindProperty("allowedTypes");
|
||||
EditorGUILayout.PropertyField(list, new GUIContent("Allowed Types"), true);
|
||||
serializedObject.ApplyModifiedProperties();
|
||||
|
||||
EditorGUILayout.HelpBox(CCKLocalizationProvider.GetLocalizedText("ABI_UI_ADVAVTR_TRIGGER_ALLOWED_TYPES_HELPBOX"), MessageType.Info);
|
||||
|
||||
trigger.allowParticleInteraction = EditorGUILayout.Toggle("Enabled Particle Interaction", trigger.allowParticleInteraction);
|
||||
|
||||
EditorGUILayout.HelpBox(CCKLocalizationProvider.GetLocalizedText("ABI_UI_ADVAVTR_TRIGGER_PARTICLE_HELPBOX"), MessageType.Info);
|
||||
|
||||
if (_onEnterList == null)
|
||||
{
|
||||
_onEnterList = new ReorderableList(trigger.enterTasks, typeof(CVRAdvancedAvatarSettingsTriggerTask),
|
||||
false, true, true, true);
|
||||
_onEnterList.drawHeaderCallback = OnDrawHeaderEnter;
|
||||
_onEnterList.drawElementCallback = OnDrawElementEnter;
|
||||
_onEnterList.elementHeightCallback = OnHeightElementEnter;
|
||||
_onEnterList.onAddCallback = OnAddEnter;
|
||||
_onEnterList.onChangedCallback = OnChangedEnter;
|
||||
}
|
||||
|
||||
_onEnterList.DoLayoutList();
|
||||
|
||||
if (_onExitList == null)
|
||||
{
|
||||
_onExitList = new ReorderableList(trigger.exitTasks, typeof(CVRAdvancedAvatarSettingsTriggerTask),
|
||||
false, true, true, true);
|
||||
_onExitList.drawHeaderCallback = OnDrawHeaderExit;
|
||||
_onExitList.drawElementCallback = OnDrawElementExit;
|
||||
_onExitList.elementHeightCallback = OnHeightElementExit;
|
||||
_onExitList.onAddCallback = OnAddExit;
|
||||
_onExitList.onChangedCallback = OnChangedExit;
|
||||
}
|
||||
|
||||
_onExitList.DoLayoutList();
|
||||
|
||||
if (_onStayList == null)
|
||||
{
|
||||
_onStayList = new ReorderableList(trigger.stayTasks, typeof(CVRAdvancedAvatarSettingsTriggerTaskStay),
|
||||
false, true, true, true);
|
||||
_onStayList.drawHeaderCallback = OnDrawHeaderStay;
|
||||
_onStayList.drawElementCallback = OnDrawElementStay;
|
||||
_onStayList.elementHeightCallback = OnHeightElementStay;
|
||||
_onStayList.onAddCallback = OnAddStay;
|
||||
_onStayList.onChangedCallback = OnChangedStay;
|
||||
}
|
||||
|
||||
_onStayList.DoLayoutList();
|
||||
|
||||
if (trigger.stayTasks.Count > 0)
|
||||
{
|
||||
trigger.sampleDirection = (CVRAdvancedAvatarSettingsTrigger.SampleDirection)
|
||||
EditorGUILayout.EnumPopup("Sample Direction", trigger.sampleDirection);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void OnDrawHeaderEnter(Rect rect)
|
||||
{
|
||||
Rect _rect = new Rect(rect.x, rect.y, rect.width, EditorGUIUtility.singleLineHeight);
|
||||
|
||||
GUI.Label(_rect, "On Enter Trigger");
|
||||
}
|
||||
|
||||
private void OnDrawElementEnter(Rect rect, int index, bool isactive, bool isfocused)
|
||||
{
|
||||
if (index > trigger.enterTasks.Count) return;
|
||||
enterEntity = trigger.enterTasks[index];
|
||||
|
||||
Rect _rect = new Rect(rect.x, rect.y, 100, EditorGUIUtility.singleLineHeight);
|
||||
|
||||
EditorGUI.LabelField(_rect, "Setting Name");
|
||||
_rect.x += 100;
|
||||
_rect.width = rect.width - 100;
|
||||
|
||||
if (animator == null)
|
||||
{
|
||||
enterEntity.settingName = EditorGUI.TextField(_rect, enterEntity.settingName);
|
||||
}
|
||||
else
|
||||
{
|
||||
_rect.y += 1;
|
||||
var animatorParams = animatorParameters.ToArray();
|
||||
var selected = animatorParameters.FindIndex(match => match == enterEntity.settingName);
|
||||
selected = Mathf.Max(EditorGUI.Popup(_rect, selected, animatorParams), 0);
|
||||
enterEntity.settingName = animatorParams[selected];
|
||||
}
|
||||
|
||||
rect.y += EditorGUIUtility.singleLineHeight * 1.25f;
|
||||
_rect = new Rect(rect.x, rect.y, 100, EditorGUIUtility.singleLineHeight);
|
||||
|
||||
EditorGUI.LabelField(_rect, "Setting Value");
|
||||
_rect.x += 100;
|
||||
_rect.width = rect.width - 100;
|
||||
enterEntity.settingValue = EditorGUI.FloatField(_rect, enterEntity.settingValue);
|
||||
|
||||
rect.y += EditorGUIUtility.singleLineHeight * 1.25f;
|
||||
_rect = new Rect(rect.x, rect.y, 100, EditorGUIUtility.singleLineHeight);
|
||||
|
||||
EditorGUI.LabelField(_rect, "Delay");
|
||||
_rect.x += 100;
|
||||
_rect.width = rect.width - 100;
|
||||
enterEntity.delay = EditorGUI.FloatField(_rect, enterEntity.delay);
|
||||
|
||||
rect.y += EditorGUIUtility.singleLineHeight * 1.25f;
|
||||
_rect = new Rect(rect.x, rect.y, 100, EditorGUIUtility.singleLineHeight);
|
||||
|
||||
EditorGUI.LabelField(_rect, "Hold Time");
|
||||
_rect.x += 100;
|
||||
_rect.width = rect.width - 100;
|
||||
enterEntity.holdTime = EditorGUI.FloatField(_rect, enterEntity.holdTime);
|
||||
|
||||
rect.y += EditorGUIUtility.singleLineHeight * 1.25f;
|
||||
_rect = new Rect(rect.x, rect.y, 100, EditorGUIUtility.singleLineHeight);
|
||||
|
||||
EditorGUI.LabelField(_rect, "Update Method");
|
||||
_rect.x += 100;
|
||||
_rect.width = rect.width - 100;
|
||||
enterEntity.updateMethod = (CVRAdvancedAvatarSettingsTriggerTask.UpdateMethod) EditorGUI.EnumPopup(_rect, enterEntity.updateMethod);
|
||||
}
|
||||
|
||||
private float OnHeightElementEnter(int index)
|
||||
{
|
||||
return EditorGUIUtility.singleLineHeight * 6.25f;
|
||||
}
|
||||
|
||||
private void OnAddEnter(ReorderableList list)
|
||||
{
|
||||
trigger.enterTasks.Add(new CVRAdvancedAvatarSettingsTriggerTask());
|
||||
Repaint();
|
||||
}
|
||||
|
||||
private void OnChangedEnter(ReorderableList list)
|
||||
{
|
||||
//EditorUtility.SetDirty(target);
|
||||
}
|
||||
|
||||
private void OnDrawHeaderExit(Rect rect)
|
||||
{
|
||||
Rect _rect = new Rect(rect.x, rect.y, rect.width, EditorGUIUtility.singleLineHeight);
|
||||
|
||||
GUI.Label(_rect, "On Exit Trigger");
|
||||
}
|
||||
|
||||
private void OnDrawElementExit(Rect rect, int index, bool isactive, bool isfocused)
|
||||
{
|
||||
if (index > trigger.exitTasks.Count) return;
|
||||
exitEntity = trigger.exitTasks[index];
|
||||
|
||||
Rect _rect = new Rect(rect.x, rect.y, 100, EditorGUIUtility.singleLineHeight);
|
||||
|
||||
EditorGUI.LabelField(_rect, "Setting Name");
|
||||
_rect.x += 100;
|
||||
_rect.width = rect.width - 100;
|
||||
|
||||
if (animator == null)
|
||||
{
|
||||
exitEntity.settingName = EditorGUI.TextField(_rect, exitEntity.settingName);
|
||||
}
|
||||
else
|
||||
{
|
||||
_rect.y += 1;
|
||||
var animatorParams = animatorParameters.ToArray();
|
||||
var selected = animatorParameters.FindIndex(match => match == exitEntity.settingName);
|
||||
selected = Mathf.Max(EditorGUI.Popup(_rect, selected, animatorParams), 0);
|
||||
exitEntity.settingName = animatorParams[selected];
|
||||
}
|
||||
|
||||
rect.y += EditorGUIUtility.singleLineHeight * 1.25f;
|
||||
_rect = new Rect(rect.x, rect.y, 100, EditorGUIUtility.singleLineHeight);
|
||||
|
||||
EditorGUI.LabelField(_rect, "Setting Value");
|
||||
_rect.x += 100;
|
||||
_rect.width = rect.width - 100;
|
||||
exitEntity.settingValue = EditorGUI.FloatField(_rect, exitEntity.settingValue);
|
||||
|
||||
rect.y += EditorGUIUtility.singleLineHeight * 1.25f;
|
||||
_rect = new Rect(rect.x, rect.y, 100, EditorGUIUtility.singleLineHeight);
|
||||
|
||||
EditorGUI.LabelField(_rect, "Delay");
|
||||
_rect.x += 100;
|
||||
_rect.width = rect.width - 100;
|
||||
exitEntity.delay = EditorGUI.FloatField(_rect, exitEntity.delay);
|
||||
|
||||
rect.y += EditorGUIUtility.singleLineHeight * 1.25f;
|
||||
_rect = new Rect(rect.x, rect.y, 100, EditorGUIUtility.singleLineHeight);
|
||||
|
||||
EditorGUI.LabelField(_rect, "Update Method");
|
||||
_rect.x += 100;
|
||||
_rect.width = rect.width - 100;
|
||||
exitEntity.updateMethod = (CVRAdvancedAvatarSettingsTriggerTask.UpdateMethod) EditorGUI.EnumPopup(_rect, exitEntity.updateMethod);
|
||||
}
|
||||
|
||||
private float OnHeightElementExit(int index)
|
||||
{
|
||||
return EditorGUIUtility.singleLineHeight * 5f;
|
||||
}
|
||||
|
||||
private void OnAddExit(ReorderableList list)
|
||||
{
|
||||
trigger.exitTasks.Add(new CVRAdvancedAvatarSettingsTriggerTask());
|
||||
Repaint();
|
||||
}
|
||||
|
||||
private void OnChangedExit(ReorderableList list)
|
||||
{
|
||||
//EditorUtility.SetDirty(target);
|
||||
}
|
||||
|
||||
private void OnDrawHeaderStay(Rect rect)
|
||||
{
|
||||
Rect _rect = new Rect(rect.x, rect.y, rect.width, EditorGUIUtility.singleLineHeight);
|
||||
|
||||
GUI.Label(_rect, "On Stay Trigger");
|
||||
}
|
||||
|
||||
private void OnDrawElementStay(Rect rect, int index, bool isactive, bool isfocused)
|
||||
{
|
||||
if (index > trigger.stayTasks.Count) return;
|
||||
stayEntity = trigger.stayTasks[index];
|
||||
|
||||
Rect _rect = new Rect(rect.x, rect.y, 100, EditorGUIUtility.singleLineHeight);
|
||||
|
||||
EditorGUI.LabelField(_rect, "Setting Name");
|
||||
_rect.x += 100;
|
||||
_rect.width = rect.width - 100;
|
||||
|
||||
if (animator == null)
|
||||
{
|
||||
stayEntity.settingName = EditorGUI.TextField(_rect, stayEntity.settingName);
|
||||
}
|
||||
else
|
||||
{
|
||||
_rect.y += 1;
|
||||
var animatorParams = animatorParameters.ToArray();
|
||||
var selected = animatorParameters.FindIndex(match => match == stayEntity.settingName);
|
||||
selected = Mathf.Max(EditorGUI.Popup(_rect, selected, animatorParams), 0);
|
||||
stayEntity.settingName = animatorParams[selected];
|
||||
}
|
||||
|
||||
rect.y += EditorGUIUtility.singleLineHeight * 1.25f;
|
||||
_rect = new Rect(rect.x, rect.y, 100, EditorGUIUtility.singleLineHeight);
|
||||
|
||||
EditorGUI.LabelField(_rect, "Update Method");
|
||||
_rect.x += 100;
|
||||
_rect.width = rect.width - 100;
|
||||
|
||||
stayEntity.updateMethod = (CVRAdvancedAvatarSettingsTriggerTaskStay.UpdateMethod) EditorGUI.EnumPopup(_rect, stayEntity.updateMethod);
|
||||
|
||||
rect.y += EditorGUIUtility.singleLineHeight * 1.25f;
|
||||
_rect = new Rect(rect.x, rect.y, 100, EditorGUIUtility.singleLineHeight);
|
||||
|
||||
if (stayEntity.updateMethod == CVRAdvancedAvatarSettingsTriggerTaskStay.UpdateMethod.SetFromPosition)
|
||||
{
|
||||
EditorGUI.LabelField(_rect, "Min Value");
|
||||
_rect.x += 100;
|
||||
_rect.width = rect.width - 100;
|
||||
stayEntity.minValue = EditorGUI.FloatField(_rect, stayEntity.minValue);
|
||||
|
||||
rect.y += EditorGUIUtility.singleLineHeight * 1.25f;
|
||||
_rect = new Rect(rect.x, rect.y, 100, EditorGUIUtility.singleLineHeight);
|
||||
|
||||
EditorGUI.LabelField(_rect, "Max Value");
|
||||
_rect.x += 100;
|
||||
_rect.width = rect.width - 100;
|
||||
stayEntity.maxValue = EditorGUI.FloatField(_rect, stayEntity.maxValue);
|
||||
|
||||
rect.y += EditorGUIUtility.singleLineHeight * 1.25f;
|
||||
_rect = new Rect(rect.x, rect.y, 100, EditorGUIUtility.singleLineHeight);
|
||||
}
|
||||
else
|
||||
{
|
||||
EditorGUI.LabelField(_rect, "Change per sec");
|
||||
_rect.x += 100;
|
||||
_rect.width = rect.width - 100;
|
||||
stayEntity.minValue = EditorGUI.FloatField(_rect, stayEntity.minValue);
|
||||
|
||||
rect.y += EditorGUIUtility.singleLineHeight * 1.25f;
|
||||
_rect = new Rect(rect.x, rect.y, 100, EditorGUIUtility.singleLineHeight);
|
||||
}
|
||||
}
|
||||
|
||||
private float OnHeightElementStay(int index)
|
||||
{
|
||||
if (index > trigger.stayTasks.Count) return EditorGUIUtility.singleLineHeight * 3.75f;
|
||||
stayEntity = trigger.stayTasks[index];
|
||||
|
||||
if (stayEntity.updateMethod == CVRAdvancedAvatarSettingsTriggerTaskStay.UpdateMethod.SetFromPosition)
|
||||
return EditorGUIUtility.singleLineHeight * 5f;
|
||||
|
||||
return EditorGUIUtility.singleLineHeight * 3.75f;
|
||||
}
|
||||
|
||||
private void OnAddStay(ReorderableList list)
|
||||
{
|
||||
trigger.stayTasks.Add(new CVRAdvancedAvatarSettingsTriggerTaskStay());
|
||||
Repaint();
|
||||
}
|
||||
|
||||
private void OnChangedStay(ReorderableList list)
|
||||
{
|
||||
//EditorUtility.SetDirty(target);
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,11 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 1a5214eab1704b85ad3364035297e7fb
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
287
Assets/ABI.CCK/Scripts/Editor/CCK_CVRAnimatorDriverEditor.cs
Executable file
287
Assets/ABI.CCK/Scripts/Editor/CCK_CVRAnimatorDriverEditor.cs
Executable file
|
@ -0,0 +1,287 @@
|
|||
using System.Collections.Generic;
|
||||
using ABI.CCK.Components;
|
||||
using UnityEditor;
|
||||
using UnityEditorInternal;
|
||||
using UnityEngine;
|
||||
using AnimatorController = UnityEditor.Animations.AnimatorController;
|
||||
using AnimatorControllerParameterType = UnityEngine.AnimatorControllerParameterType;
|
||||
|
||||
namespace ABI.CCK.Scripts.Editor
|
||||
{
|
||||
[CustomEditor(typeof(ABI.CCK.Components.CVRAnimatorDriver))]
|
||||
public class CCK_CVRAnimatorDriverEditor : UnityEditor.Editor
|
||||
{
|
||||
private CVRAnimatorDriver _driver;
|
||||
|
||||
private ReorderableList reorderableList;
|
||||
|
||||
private List<string> animatorParamNameList = new List<string>();
|
||||
private List<AnimatorControllerParameterType> animatorParamTypeList = new List<AnimatorControllerParameterType>();
|
||||
|
||||
private Dictionary<AnimatorControllerParameterType, int> typeList = new Dictionary<AnimatorControllerParameterType, int>()
|
||||
{
|
||||
{AnimatorControllerParameterType.Float, 0},
|
||||
{AnimatorControllerParameterType.Int, 1},
|
||||
{AnimatorControllerParameterType.Bool, 2},
|
||||
{AnimatorControllerParameterType.Trigger, 3}
|
||||
};
|
||||
|
||||
private void InitializeList()
|
||||
{
|
||||
reorderableList = new ReorderableList(_driver.animators, typeof(Animator),
|
||||
false, true, true, true);
|
||||
reorderableList.drawHeaderCallback = OnDrawHeader;
|
||||
reorderableList.drawElementCallback = OnDrawElement;
|
||||
reorderableList.elementHeightCallback = OnHeightElement;
|
||||
reorderableList.onAddCallback = OnAdd;
|
||||
reorderableList.onChangedCallback = OnChanged;
|
||||
reorderableList.onRemoveCallback = OnRemove;
|
||||
}
|
||||
|
||||
private void OnRemove(ReorderableList list)
|
||||
{
|
||||
_driver.animators.RemoveAt(list.index);
|
||||
_driver.animatorParameters.RemoveAt(list.index);
|
||||
_driver.animatorParameterType.RemoveAt(list.index);
|
||||
Repaint();
|
||||
}
|
||||
|
||||
private void OnChanged(ReorderableList list)
|
||||
{
|
||||
//EditorUtility.SetDirty(target);
|
||||
}
|
||||
|
||||
private void OnAdd(ReorderableList list)
|
||||
{
|
||||
if (_driver.animators.Count >= 16) return;
|
||||
_driver.animators.Add(null);
|
||||
_driver.animatorParameters.Add(null);
|
||||
_driver.animatorParameterType.Add(0);
|
||||
Repaint();
|
||||
}
|
||||
|
||||
private float OnHeightElement(int index)
|
||||
{
|
||||
return EditorGUIUtility.singleLineHeight * 3 * 1.25f;
|
||||
}
|
||||
|
||||
private void OnDrawElement(Rect rect, int index, bool isactive, bool isfocused)
|
||||
{
|
||||
if (index > _driver.animators.Count) return;
|
||||
|
||||
rect.y += 2;
|
||||
rect.x += 12;
|
||||
rect.width -= 12;
|
||||
Rect _rect = new Rect(rect.x, rect.y, 100, EditorGUIUtility.singleLineHeight);
|
||||
|
||||
EditorGUI.LabelField(_rect, "Animator");
|
||||
|
||||
_rect.x += 100;
|
||||
_rect.width = rect.width - 100;
|
||||
|
||||
EditorGUI.BeginChangeCheck();
|
||||
|
||||
var animator = (Animator) EditorGUI.ObjectField(_rect, _driver.animators[index], typeof(Animator), true);
|
||||
|
||||
if (EditorGUI.EndChangeCheck())
|
||||
{
|
||||
Undo.RecordObject(target, "Animator Driver Animator changed");
|
||||
EditorUtility.SetDirty(_driver);
|
||||
_driver.animators[index] = animator;
|
||||
}
|
||||
|
||||
rect.y += EditorGUIUtility.singleLineHeight * 1.25f;
|
||||
_rect = new Rect(rect.x, rect.y, 100, EditorGUIUtility.singleLineHeight);
|
||||
|
||||
EditorGUI.LabelField(_rect, "Parameter");
|
||||
|
||||
_rect.x += 100;
|
||||
_rect.width = rect.width - 100;
|
||||
|
||||
animatorParamNameList.Clear();
|
||||
animatorParamTypeList.Clear();
|
||||
|
||||
animatorParamNameList.Add("-none-");
|
||||
animatorParamTypeList.Add(AnimatorControllerParameterType.Bool);
|
||||
|
||||
var oldIndex = 0;
|
||||
var i = 1;
|
||||
|
||||
if (_driver.animators[index] != null && _driver.animators[index].runtimeAnimatorController != null)
|
||||
{
|
||||
var controller = (AnimatorController) _driver.animators[index].runtimeAnimatorController;
|
||||
foreach (var parameter in controller.parameters)
|
||||
{
|
||||
animatorParamNameList.Add(parameter.name);
|
||||
animatorParamTypeList.Add(parameter.type);
|
||||
|
||||
if (_driver.animatorParameters[index] == parameter.name)
|
||||
{
|
||||
oldIndex = i;
|
||||
}
|
||||
|
||||
i++;
|
||||
}
|
||||
}
|
||||
|
||||
EditorGUI.BeginChangeCheck();
|
||||
|
||||
var parameterIndex = EditorGUI.Popup(_rect, oldIndex, animatorParamNameList.ToArray());
|
||||
|
||||
if (EditorGUI.EndChangeCheck())
|
||||
{
|
||||
Undo.RecordObject(target, "Animator Driver Parameter changed");
|
||||
EditorUtility.SetDirty(_driver);
|
||||
_driver.animatorParameters[index] = animatorParamNameList[parameterIndex];
|
||||
_driver.animatorParameterType[index] = typeList[animatorParamTypeList[parameterIndex]];
|
||||
}
|
||||
|
||||
rect.y += EditorGUIUtility.singleLineHeight * 1.25f;
|
||||
_rect = new Rect(rect.x, rect.y, 100, EditorGUIUtility.singleLineHeight);
|
||||
|
||||
EditorGUI.LabelField(_rect, "Value");
|
||||
|
||||
_rect.x += 100;
|
||||
_rect.width = rect.width - 100;
|
||||
|
||||
EditorGUI.BeginChangeCheck();
|
||||
|
||||
var value = EditorGUI.FloatField(_rect, GetAnimatorParameterValue(index));
|
||||
|
||||
if (EditorGUI.EndChangeCheck())
|
||||
{
|
||||
Undo.RecordObject(target, "Animator Driver Value changed");
|
||||
EditorUtility.SetDirty(_driver);
|
||||
SetAnimatorParameterValue(index, value);
|
||||
}
|
||||
}
|
||||
|
||||
private void OnDrawHeader(Rect rect)
|
||||
{
|
||||
Rect _rect = new Rect(rect.x, rect.y, rect.width, EditorGUIUtility.singleLineHeight);
|
||||
|
||||
GUI.Label(_rect, "Animator Parameters");
|
||||
}
|
||||
|
||||
|
||||
public override void OnInspectorGUI()
|
||||
{
|
||||
if (_driver == null) _driver = (CVRAnimatorDriver) target;
|
||||
|
||||
EditorGUILayout.Space();
|
||||
|
||||
if (reorderableList == null) InitializeList();
|
||||
reorderableList.DoLayoutList();
|
||||
}
|
||||
|
||||
public float GetAnimatorParameterValue(int index)
|
||||
{
|
||||
switch (index)
|
||||
{
|
||||
case 0:
|
||||
return _driver.animatorParameter01;
|
||||
break;
|
||||
case 1:
|
||||
return _driver.animatorParameter02;
|
||||
break;
|
||||
case 2:
|
||||
return _driver.animatorParameter03;
|
||||
break;
|
||||
case 3:
|
||||
return _driver.animatorParameter04;
|
||||
break;
|
||||
case 4:
|
||||
return _driver.animatorParameter05;
|
||||
break;
|
||||
case 5:
|
||||
return _driver.animatorParameter06;
|
||||
break;
|
||||
case 6:
|
||||
return _driver.animatorParameter07;
|
||||
break;
|
||||
case 7:
|
||||
return _driver.animatorParameter08;
|
||||
break;
|
||||
case 8:
|
||||
return _driver.animatorParameter09;
|
||||
break;
|
||||
case 9:
|
||||
return _driver.animatorParameter10;
|
||||
break;
|
||||
case 10:
|
||||
return _driver.animatorParameter11;
|
||||
break;
|
||||
case 11:
|
||||
return _driver.animatorParameter12;
|
||||
break;
|
||||
case 12:
|
||||
return _driver.animatorParameter13;
|
||||
break;
|
||||
case 13:
|
||||
return _driver.animatorParameter14;
|
||||
break;
|
||||
case 14:
|
||||
return _driver.animatorParameter15;
|
||||
break;
|
||||
default:
|
||||
return _driver.animatorParameter16;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
public void SetAnimatorParameterValue(int index, float value)
|
||||
{
|
||||
switch (index)
|
||||
{
|
||||
case 0:
|
||||
_driver.animatorParameter01 = value;
|
||||
break;
|
||||
case 1:
|
||||
_driver.animatorParameter02 = value;
|
||||
break;
|
||||
case 2:
|
||||
_driver.animatorParameter03 = value;
|
||||
break;
|
||||
case 3:
|
||||
_driver.animatorParameter04 = value;
|
||||
break;
|
||||
case 4:
|
||||
_driver.animatorParameter05 = value;
|
||||
break;
|
||||
case 5:
|
||||
_driver.animatorParameter06 = value;
|
||||
break;
|
||||
case 6:
|
||||
_driver.animatorParameter07 = value;
|
||||
break;
|
||||
case 7:
|
||||
_driver.animatorParameter08 = value;
|
||||
break;
|
||||
case 8:
|
||||
_driver.animatorParameter09 = value;
|
||||
break;
|
||||
case 9:
|
||||
_driver.animatorParameter10 = value;
|
||||
break;
|
||||
case 10:
|
||||
_driver.animatorParameter11 = value;
|
||||
break;
|
||||
case 11:
|
||||
_driver.animatorParameter12 = value;
|
||||
break;
|
||||
case 12:
|
||||
_driver.animatorParameter13 = value;
|
||||
break;
|
||||
case 13:
|
||||
_driver.animatorParameter14 = value;
|
||||
break;
|
||||
case 14:
|
||||
_driver.animatorParameter15 = value;
|
||||
break;
|
||||
default:
|
||||
_driver.animatorParameter16 = value;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
3
Assets/ABI.CCK/Scripts/Editor/CCK_CVRAnimatorDriverEditor.cs.meta
Executable file
3
Assets/ABI.CCK/Scripts/Editor/CCK_CVRAnimatorDriverEditor.cs.meta
Executable file
|
@ -0,0 +1,3 @@
|
|||
fileFormatVersion: 2
|
||||
guid: f80fa88a5f324dc2baba380a78cf3ac2
|
||||
timeCreated: 1622860287
|
66
Assets/ABI.CCK/Scripts/Editor/CCK_CVRAssetInfoEditor.cs
Executable file
66
Assets/ABI.CCK/Scripts/Editor/CCK_CVRAssetInfoEditor.cs
Executable file
|
@ -0,0 +1,66 @@
|
|||
using System;
|
||||
using ABI.CCK.Components;
|
||||
using UnityEditor;
|
||||
using UnityEngine;
|
||||
|
||||
namespace ABI.CCK.Scripts.Editor
|
||||
{
|
||||
|
||||
[CustomEditor(typeof(ABI.CCK.Components.CVRAssetInfo))]
|
||||
public class CCK_CVRAssetInfoEditor : UnityEditor.Editor
|
||||
{
|
||||
private CVRAssetInfo _info;
|
||||
private string _newGuid;
|
||||
|
||||
public override void OnInspectorGUI()
|
||||
{
|
||||
if (_info == null) _info = (CVRAssetInfo)target;
|
||||
|
||||
EditorGUILayout.HelpBox(CCKLocalizationProvider.GetLocalizedText("ABI_UI_ASSET_INFO_HEADER_INFORMATION"), MessageType.Info);
|
||||
|
||||
if (!string.IsNullOrEmpty(_info.objectId))
|
||||
{
|
||||
EditorGUILayout.HelpBox(CCKLocalizationProvider.GetLocalizedText("ABI_UI_ASSET_INFO_GUID_LABEL") + _info.objectId, MessageType.Info);
|
||||
|
||||
EditorGUILayout.BeginHorizontal();
|
||||
|
||||
if (GUILayout.Button(CCKLocalizationProvider.GetLocalizedText("ABI_UI_ASSET_INFO_DETACH_BUTTON")))
|
||||
{
|
||||
bool detach = EditorUtility.DisplayDialog(
|
||||
CCKLocalizationProvider.GetLocalizedText("ABI_UI_ASSET_INFO_DETACH_BUTTON_DIALOG_TITLE"),
|
||||
CCKLocalizationProvider.GetLocalizedText("ABI_UI_ASSET_INFO_DETACH_BUTTON_DIALOG_BODY"),
|
||||
CCKLocalizationProvider.GetLocalizedText("ABI_UI_ASSET_INFO_DETACH_BUTTON_DIALOG_ACCEPT"),
|
||||
CCKLocalizationProvider.GetLocalizedText("ABI_UI_ASSET_INFO_DETACH_BUTTON_DIALOG_DENY"));
|
||||
if (detach) DetachGuid();
|
||||
}
|
||||
|
||||
if (GUILayout.Button(CCKLocalizationProvider.GetLocalizedText("ABI_UI_ASSET_INFO_COPY_BUTTON")))
|
||||
{
|
||||
if (!string.IsNullOrEmpty(_info.objectId))
|
||||
{
|
||||
GUIUtility.systemCopyBuffer = _info.objectId;
|
||||
}
|
||||
}
|
||||
|
||||
EditorGUILayout.EndHorizontal();
|
||||
}
|
||||
else
|
||||
{
|
||||
_newGuid = EditorGUILayout.TextField(CCKLocalizationProvider.GetLocalizedText("ABI_UI_ASSET_INFO_ATTACH_LABEL"), _newGuid);
|
||||
EditorGUILayout.HelpBox(CCKLocalizationProvider.GetLocalizedText("ABI_UI_ASSET_INFO_ATTACH_INFO"), MessageType.Warning);
|
||||
if (GUILayout.Button(CCKLocalizationProvider.GetLocalizedText("ABI_UI_ASSET_INFO_ATTACH_BUTTON"))) ReattachGuid(_newGuid);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
private void DetachGuid()
|
||||
{
|
||||
if (!string.IsNullOrEmpty(_info.objectId)) _info.objectId = string.Empty;
|
||||
}
|
||||
private void ReattachGuid(string Guid)
|
||||
{
|
||||
_info.objectId = Guid;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
3
Assets/ABI.CCK/Scripts/Editor/CCK_CVRAssetInfoEditor.cs.meta
Executable file
3
Assets/ABI.CCK/Scripts/Editor/CCK_CVRAssetInfoEditor.cs.meta
Executable file
|
@ -0,0 +1,3 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 48b4c08063af4400ae880f2c7ee030ff
|
||||
timeCreated: 1574589249
|
1168
Assets/ABI.CCK/Scripts/Editor/CCK_CVRAvatarEditor.cs
Executable file
1168
Assets/ABI.CCK/Scripts/Editor/CCK_CVRAvatarEditor.cs
Executable file
File diff suppressed because it is too large
Load diff
3
Assets/ABI.CCK/Scripts/Editor/CCK_CVRAvatarEditor.cs.meta
Executable file
3
Assets/ABI.CCK/Scripts/Editor/CCK_CVRAvatarEditor.cs.meta
Executable file
|
@ -0,0 +1,3 @@
|
|||
fileFormatVersion: 2
|
||||
guid: e7b3dab747ad467fab76e5d43bb42298
|
||||
timeCreated: 1573835270
|
59
Assets/ABI.CCK/Scripts/Editor/CCK_CVRDescriptionEditor.cs
Executable file
59
Assets/ABI.CCK/Scripts/Editor/CCK_CVRDescriptionEditor.cs
Executable file
|
@ -0,0 +1,59 @@
|
|||
using ABI.CCK.Components;
|
||||
using UnityEditor;
|
||||
using UnityEngine;
|
||||
|
||||
namespace ABI.CCK.Scripts.Editor
|
||||
{
|
||||
[CustomEditor(typeof(ABI.CCK.Components.CVRDescription))]
|
||||
public class CCK_CVRDescriptionEditor : UnityEditor.Editor
|
||||
{
|
||||
private CVRDescription _description;
|
||||
public override void OnInspectorGUI()
|
||||
{
|
||||
if (_description == null) _description = (CVRDescription) target;
|
||||
|
||||
if (_description.locked)
|
||||
{
|
||||
switch (_description.type)
|
||||
{
|
||||
case 0:
|
||||
EditorGUILayout.HelpBox(_description.description, MessageType.None);
|
||||
break;
|
||||
case 1:
|
||||
EditorGUILayout.HelpBox(_description.description, MessageType.Info);
|
||||
break;
|
||||
case 2:
|
||||
EditorGUILayout.HelpBox(_description.description, MessageType.Warning);
|
||||
break;
|
||||
case 3:
|
||||
EditorGUILayout.HelpBox(_description.description, MessageType.Error);
|
||||
break;
|
||||
}
|
||||
|
||||
if (!string.IsNullOrEmpty(_description.url))
|
||||
{
|
||||
if (GUILayout.Button("Read more about this topic"))
|
||||
{
|
||||
Application.OpenURL(_description.url);
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
EditorGUILayout.LabelField("Description");
|
||||
_description.description = EditorGUILayout.TextArea(_description.description);
|
||||
|
||||
EditorGUILayout.LabelField("Documentation Url");
|
||||
_description.url = EditorGUILayout.TextField(_description.url);
|
||||
|
||||
EditorGUILayout.LabelField("Icon Type");
|
||||
_description.type = EditorGUILayout.Popup(_description.type, new string[] { "None", "Info", "Warning", "Error" });
|
||||
|
||||
if (GUILayout.Button("Lock info"))
|
||||
{
|
||||
_description.locked = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
3
Assets/ABI.CCK/Scripts/Editor/CCK_CVRDescriptionEditor.cs.meta
Executable file
3
Assets/ABI.CCK/Scripts/Editor/CCK_CVRDescriptionEditor.cs.meta
Executable file
|
@ -0,0 +1,3 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 08bdd1015ea341a79650e069d11b4285
|
||||
timeCreated: 1643768897
|
132
Assets/ABI.CCK/Scripts/Editor/CCK_CVRFaceTrackingEditor.cs
Executable file
132
Assets/ABI.CCK/Scripts/Editor/CCK_CVRFaceTrackingEditor.cs
Executable file
|
@ -0,0 +1,132 @@
|
|||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using ABI.CCK.Components;
|
||||
using UnityEditor;
|
||||
using UnityEngine;
|
||||
|
||||
namespace ABI.CCK.Scripts.Editor
|
||||
{
|
||||
[CustomEditor(typeof(ABI.CCK.Components.CVRFaceTracking))]
|
||||
public class CCK_CVRFaceTrackingEditor : UnityEditor.Editor
|
||||
{
|
||||
private CVRFaceTracking _faceTracking;
|
||||
|
||||
public override void OnInspectorGUI()
|
||||
{
|
||||
if (_faceTracking == null) _faceTracking = (CVRFaceTracking) target;
|
||||
|
||||
_faceTracking.GetBlendShapeNames();
|
||||
|
||||
_faceTracking.UseFacialTracking = EditorGUILayout.Toggle("Enable Facial Tracking", _faceTracking.UseFacialTracking);
|
||||
|
||||
_faceTracking.BlendShapeStrength = EditorGUILayout.Slider("Blend Shape Weight", _faceTracking.BlendShapeStrength, 50f, 500f);
|
||||
|
||||
_faceTracking.FaceMesh = (SkinnedMeshRenderer)EditorGUILayout.ObjectField("Face Mesh", _faceTracking.FaceMesh, typeof(SkinnedMeshRenderer), true);
|
||||
|
||||
for (int i = 0; i < CVRFaceTracking.FaceBlendShapeNames.Length; i++)
|
||||
{
|
||||
int current = 0;
|
||||
for (int j = 0; j < _faceTracking.BlendShapeNames.Count; ++j)
|
||||
if (_faceTracking.FaceBlendShapes[i] == _faceTracking.BlendShapeNames[j])
|
||||
current = j;
|
||||
|
||||
int viseme = EditorGUILayout.Popup(CVRFaceTracking.FaceBlendShapeNames[i], current, _faceTracking.BlendShapeNames.ToArray());
|
||||
_faceTracking.FaceBlendShapes[i] = _faceTracking.BlendShapeNames[viseme];
|
||||
}
|
||||
|
||||
if (GUILayout.Button("Auto select Blendshapes"))
|
||||
{
|
||||
_faceTracking.FindVisemes();
|
||||
}
|
||||
|
||||
EditorGUILayout.BeginVertical("HelpBox");
|
||||
EditorGUILayout.LabelField("Face Tracking ");
|
||||
EditorGUILayout.BeginVertical("GroupBox");
|
||||
|
||||
_faceTracking.enableOverdriveBlendShapes = EditorGUILayout.Toggle("Enable Overdrive", _faceTracking.enableOverdriveBlendShapes);
|
||||
EditorGUILayout.HelpBox("By enabling overdrive the system expects the blendshapes to be at 500% when fully set. You can use the button below to generate 500% versions of the currently selected blendshapes.", MessageType.Info);
|
||||
|
||||
if (GUILayout.Button("Generate overdrive Blendshapes (Experimental)"))
|
||||
{
|
||||
GenerateOverdriveBlendShapes();
|
||||
}
|
||||
|
||||
EditorGUILayout.EndVertical();
|
||||
EditorGUILayout.EndVertical();
|
||||
|
||||
EditorGUILayout.Space();
|
||||
|
||||
EditorGUILayout.HelpBox("We have prepared a way to generate a simple facial tracker support for your avatars without any requirement to use a 3D model software. For a more in-depth / detailed support, please create the required blendshapes using a 3D modeling software. More information can be found in our documentation.", MessageType.Info);
|
||||
|
||||
if (GUILayout.Button("Open Blendshape Generator (Experimental)"))
|
||||
{
|
||||
CCK_FaceTrackingUtilities window = (CCK_FaceTrackingUtilities)EditorWindow.GetWindow (typeof(CCK_FaceTrackingUtilities), true, "CCK :: Face Tracking Utilities");
|
||||
window.Avatar = _faceTracking.gameObject.GetComponent<CVRAvatar>();
|
||||
if (window.Avatar == null) window.Avatar = _faceTracking.gameObject.GetComponentInParent<CVRAvatar>();
|
||||
window.FaceTracking = _faceTracking;
|
||||
window.Tab = 1;
|
||||
window.Show();
|
||||
}
|
||||
|
||||
if (GUILayout.Button("Reset to original Mesh"))
|
||||
{
|
||||
if (_faceTracking.OriginalMesh != null)
|
||||
{
|
||||
_faceTracking.FaceMesh.sharedMesh = _faceTracking.OriginalMesh;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public void GenerateOverdriveBlendShapes()
|
||||
{
|
||||
Mesh mesh;
|
||||
CVRAvatar avatar = _faceTracking.GetComponentInParent<CVRAvatar>();
|
||||
|
||||
if (_faceTracking.FaceMesh.sharedMesh != _faceTracking.OriginalMesh)
|
||||
{
|
||||
mesh = _faceTracking.FaceMesh.sharedMesh.Copy();
|
||||
|
||||
string pathToCurrentFolder = "Assets/FaceTracking.Generated";
|
||||
if (!AssetDatabase.IsValidFolder(pathToCurrentFolder)) AssetDatabase.CreateFolder("Assets", "FaceTracking.Generated");
|
||||
var meshPath = pathToCurrentFolder + "/" + avatar.transform.name + ".mesh";
|
||||
AssetDatabase.CreateAsset(mesh, meshPath);
|
||||
|
||||
_faceTracking.FaceMesh.sharedMesh = mesh;
|
||||
}
|
||||
else
|
||||
{
|
||||
mesh = _faceTracking.FaceMesh.sharedMesh;
|
||||
}
|
||||
|
||||
for (int i = 0; i < mesh.blendShapeCount; i++)
|
||||
{
|
||||
if (_faceTracking.FaceBlendShapes.Contains(mesh.GetBlendShapeName(i)))
|
||||
{
|
||||
var frameCount = mesh.GetBlendShapeFrameCount(i);
|
||||
var frameWeight = mesh.GetBlendShapeFrameWeight(i, frameCount - 1);
|
||||
if (!mesh.GetBlendShapeName(i).Contains("_overdrive"))
|
||||
{
|
||||
Vector3[] deltaVertices = new Vector3[mesh.vertexCount];
|
||||
Vector3[] deltaNormals = new Vector3[mesh.vertexCount];
|
||||
Vector3[] deltaTangents = new Vector3[mesh.vertexCount];
|
||||
mesh.GetBlendShapeFrameVertices(i, 0, deltaVertices, deltaNormals, deltaTangents);
|
||||
|
||||
for (int j=0; j < deltaVertices.Length; j++)
|
||||
{
|
||||
deltaVertices[j] = deltaVertices[j] * 5f;
|
||||
}
|
||||
|
||||
mesh.AddBlendShapeFrame(mesh.GetBlendShapeName(i)+"_overdrive", 100f, deltaVertices, deltaNormals, deltaTangents);
|
||||
var index = _faceTracking.FaceBlendShapes.ToList().FindIndex(m => m == mesh.GetBlendShapeName(i));
|
||||
_faceTracking.FaceBlendShapes[index] = mesh.GetBlendShapeName(i) + "_overdrive";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
_faceTracking.GetBlendShapeNames();
|
||||
_faceTracking.enableOverdriveBlendShapes = true;
|
||||
|
||||
AssetDatabase.SaveAssets();
|
||||
}
|
||||
}
|
||||
}
|
3
Assets/ABI.CCK/Scripts/Editor/CCK_CVRFaceTrackingEditor.cs.meta
Executable file
3
Assets/ABI.CCK/Scripts/Editor/CCK_CVRFaceTrackingEditor.cs.meta
Executable file
|
@ -0,0 +1,3 @@
|
|||
fileFormatVersion: 2
|
||||
guid: ac9db061851946bbb5d249c7bb013765
|
||||
timeCreated: 1621992840
|
55
Assets/ABI.CCK/Scripts/Editor/CCK_CVRGlobalMaterialPropertyUpdaterEditor.cs
Executable file
55
Assets/ABI.CCK/Scripts/Editor/CCK_CVRGlobalMaterialPropertyUpdaterEditor.cs
Executable file
|
@ -0,0 +1,55 @@
|
|||
using ABI.CCK.Components;
|
||||
using UnityEditor;
|
||||
using UnityEngine;
|
||||
|
||||
namespace ABI.CCK.Scripts.Editor
|
||||
{
|
||||
[CustomEditor(typeof(CVRGlobalMaterialPropertyUpdater))]
|
||||
public class CCK_CVRGlobalMaterialPropertyUpdaterEditor : UnityEditor.Editor
|
||||
{
|
||||
private CVRGlobalMaterialPropertyUpdater _target;
|
||||
|
||||
public override void OnInspectorGUI()
|
||||
{
|
||||
if (_target == null) _target = (CVRGlobalMaterialPropertyUpdater) target;
|
||||
|
||||
EditorGUI.BeginChangeCheck();
|
||||
|
||||
Material material = (Material) EditorGUILayout.ObjectField("Material", _target.material, typeof(Material));
|
||||
|
||||
CVRGlobalMaterialPropertyUpdater.PropertyType type = (CVRGlobalMaterialPropertyUpdater.PropertyType) EditorGUILayout.EnumPopup("Property Type", _target.propertyType);
|
||||
|
||||
string name = EditorGUILayout.TextField("Property Name", _target.propertyName);
|
||||
|
||||
int intval = 0;
|
||||
float floatval = 0f;
|
||||
Vector4 vectorval = Vector4.zero;
|
||||
|
||||
switch (type)
|
||||
{
|
||||
case CVRGlobalMaterialPropertyUpdater.PropertyType.paramInt:
|
||||
intval = EditorGUILayout.IntField("Value", _target.intValue);
|
||||
break;
|
||||
case CVRGlobalMaterialPropertyUpdater.PropertyType.paramFloat:
|
||||
floatval = EditorGUILayout.FloatField("Value", _target.floatValue);
|
||||
break;
|
||||
case CVRGlobalMaterialPropertyUpdater.PropertyType.paramVector4:
|
||||
vectorval = EditorGUILayout.Vector4Field("Value", _target.vector4Value);
|
||||
break;
|
||||
}
|
||||
|
||||
if (EditorGUI.EndChangeCheck())
|
||||
{
|
||||
Undo.RecordObject(target, "Changed CVRGlobalMaterialPropertyUpdater");
|
||||
|
||||
_target.material = material;
|
||||
_target.propertyType = type;
|
||||
_target.propertyName = name;
|
||||
|
||||
_target.intValue = intval;
|
||||
_target.floatValue = floatval;
|
||||
_target.vector4Value = vectorval;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,3 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 57c8fcff5e4d48a199de9d61afa43390
|
||||
timeCreated: 1644963336
|
62
Assets/ABI.CCK/Scripts/Editor/CCK_CVRGlobalShaderUpdaterEditor.cs
Executable file
62
Assets/ABI.CCK/Scripts/Editor/CCK_CVRGlobalShaderUpdaterEditor.cs
Executable file
|
@ -0,0 +1,62 @@
|
|||
using ABI.CCK.Components;
|
||||
using UnityEditor;
|
||||
using UnityEngine;
|
||||
|
||||
namespace ABI.CCK.Scripts.Editor
|
||||
{
|
||||
[CustomEditor(typeof(ABI.CCK.Components.CVRGlobalShaderUpdater))]
|
||||
public class CCK_CVRGlobalShaderUpdaterEditor : UnityEditor.Editor
|
||||
{
|
||||
private CVRGlobalShaderUpdater _globalShaderUpdater;
|
||||
|
||||
public override void OnInspectorGUI()
|
||||
{
|
||||
if (_globalShaderUpdater == null) _globalShaderUpdater = (CVRGlobalShaderUpdater) target;
|
||||
|
||||
EditorGUI.BeginChangeCheck();
|
||||
|
||||
bool updateValues = EditorGUILayout.Toggle("Update Values", _globalShaderUpdater.updateValues);
|
||||
|
||||
Vector4 CVR_CCK_Global_1 = Vector4.zero;
|
||||
Vector4 CVR_CCK_Global_2 = Vector4.zero;
|
||||
Vector4 CVR_CCK_Global_3 = Vector4.zero;
|
||||
Vector4 CVR_CCK_Global_4 = Vector4.zero;
|
||||
|
||||
if (updateValues)
|
||||
{
|
||||
CVR_CCK_Global_1 = EditorGUILayout.Vector4Field("CVR_CCK_Global_1", _globalShaderUpdater.CVR_CCK_Global_1);
|
||||
CVR_CCK_Global_2 = EditorGUILayout.Vector4Field("CVR_CCK_Global_2", _globalShaderUpdater.CVR_CCK_Global_2);
|
||||
CVR_CCK_Global_3 = EditorGUILayout.Vector4Field("CVR_CCK_Global_3", _globalShaderUpdater.CVR_CCK_Global_3);
|
||||
CVR_CCK_Global_4 = EditorGUILayout.Vector4Field("CVR_CCK_Global_4", _globalShaderUpdater.CVR_CCK_Global_4);
|
||||
}
|
||||
|
||||
EditorGUILayout.Space();
|
||||
|
||||
bool updateTexture = EditorGUILayout.Toggle("Update Texture", _globalShaderUpdater.updateTexture);
|
||||
|
||||
RenderTexture renderTexture = null;
|
||||
string propertyName = "";
|
||||
|
||||
if (updateTexture)
|
||||
{
|
||||
renderTexture = (RenderTexture) EditorGUILayout.ObjectField("Render Texture", _globalShaderUpdater.renderTexture, typeof(RenderTexture));
|
||||
propertyName = EditorGUILayout.TextField("Property Name", _globalShaderUpdater.propertyName);
|
||||
}
|
||||
|
||||
if (EditorGUI.EndChangeCheck())
|
||||
{
|
||||
Undo.RecordObject(target, "Changed CVRGlobalShaderUpdater");
|
||||
|
||||
_globalShaderUpdater.updateValues = updateValues;
|
||||
_globalShaderUpdater.CVR_CCK_Global_1 = CVR_CCK_Global_1;
|
||||
_globalShaderUpdater.CVR_CCK_Global_2 = CVR_CCK_Global_2;
|
||||
_globalShaderUpdater.CVR_CCK_Global_3 = CVR_CCK_Global_3;
|
||||
_globalShaderUpdater.CVR_CCK_Global_4 = CVR_CCK_Global_4;
|
||||
|
||||
_globalShaderUpdater.updateTexture = updateTexture;
|
||||
_globalShaderUpdater.renderTexture = renderTexture;
|
||||
_globalShaderUpdater.propertyName = propertyName;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
3
Assets/ABI.CCK/Scripts/Editor/CCK_CVRGlobalShaderUpdaterEditor.cs.meta
Executable file
3
Assets/ABI.CCK/Scripts/Editor/CCK_CVRGlobalShaderUpdaterEditor.cs.meta
Executable file
|
@ -0,0 +1,3 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 92b8c0189baf4b43b7e078dc60873604
|
||||
timeCreated: 1644957427
|
99
Assets/ABI.CCK/Scripts/Editor/CCK_CVRHapticZoneEditor.cs
Executable file
99
Assets/ABI.CCK/Scripts/Editor/CCK_CVRHapticZoneEditor.cs
Executable file
|
@ -0,0 +1,99 @@
|
|||
using ABI.CCK.Components;
|
||||
using UnityEditor;
|
||||
using UnityEngine;
|
||||
|
||||
namespace ABI.CCK.Scripts.Editor
|
||||
{
|
||||
[CustomEditor(typeof(CVRHapticZone))]
|
||||
public class CCK_CVRHapticZoneEditor : UnityEditor.Editor
|
||||
{
|
||||
private CVRHapticZone _hapticZone;
|
||||
|
||||
public override void OnInspectorGUI()
|
||||
{
|
||||
if (_hapticZone == null) _hapticZone = (CVRHapticZone) target;
|
||||
|
||||
_hapticZone.triggerForm = (CVRHapticZone.TriggerForm) EditorGUILayout.EnumPopup("Trigger Form", _hapticZone.triggerForm);
|
||||
|
||||
_hapticZone.center = EditorGUILayout.Vector3Field("Trigger Center", _hapticZone.center);
|
||||
|
||||
if (_hapticZone.triggerForm == CVRHapticZone.TriggerForm.Box)
|
||||
{
|
||||
_hapticZone.bounds = EditorGUILayout.Vector3Field("Trigger Bounds", _hapticZone.bounds);
|
||||
}
|
||||
else
|
||||
{
|
||||
_hapticZone.bounds.x = EditorGUILayout.FloatField("Trigger Radius", _hapticZone.bounds.x);
|
||||
}
|
||||
|
||||
GUILayout.BeginVertical("HelpBox");
|
||||
|
||||
GUILayout.BeginHorizontal ();
|
||||
_hapticZone.enableOnEnter = EditorGUILayout.Toggle (_hapticZone.enableOnEnter, GUILayout.Width(16));
|
||||
EditorGUILayout.LabelField ("On Enter", GUILayout.Width(150));
|
||||
GUILayout.EndHorizontal ();
|
||||
|
||||
if (_hapticZone.enableOnEnter)
|
||||
{
|
||||
GUILayout.BeginHorizontal();
|
||||
GUILayout.BeginVertical("GroupBox");
|
||||
|
||||
_hapticZone.onEnterIntensity = EditorGUILayout.Slider("Intensity", _hapticZone.onEnterIntensity, 0f, 1f);
|
||||
|
||||
GUILayout.EndVertical ();
|
||||
GUILayout.EndHorizontal ();
|
||||
}
|
||||
|
||||
GUILayout.EndVertical();
|
||||
|
||||
|
||||
GUILayout.BeginVertical("HelpBox");
|
||||
|
||||
GUILayout.BeginHorizontal ();
|
||||
_hapticZone.enableOnStay = EditorGUILayout.Toggle (_hapticZone.enableOnStay, GUILayout.Width(16));
|
||||
EditorGUILayout.LabelField ("On Stay", GUILayout.Width(150));
|
||||
GUILayout.EndHorizontal ();
|
||||
|
||||
if (_hapticZone.enableOnStay)
|
||||
{
|
||||
GUILayout.BeginHorizontal();
|
||||
GUILayout.BeginVertical("GroupBox");
|
||||
|
||||
_hapticZone.onStayIntensity = EditorGUILayout.Slider("Intensity", _hapticZone.onStayIntensity, 0f, 1f);
|
||||
|
||||
_hapticZone.onStayTiming = (CVRHapticZone.TriggerTiming) EditorGUILayout.EnumPopup("Timing", _hapticZone.onStayTiming);
|
||||
|
||||
if (_hapticZone.onStayTiming == CVRHapticZone.TriggerTiming.random)
|
||||
{
|
||||
_hapticZone.onStayChance = EditorGUILayout.Slider("Chance", _hapticZone.onStayChance, 0f, 1f);
|
||||
}
|
||||
|
||||
GUILayout.EndVertical ();
|
||||
GUILayout.EndHorizontal ();
|
||||
}
|
||||
|
||||
GUILayout.EndVertical();
|
||||
|
||||
|
||||
GUILayout.BeginVertical("HelpBox");
|
||||
|
||||
GUILayout.BeginHorizontal ();
|
||||
_hapticZone.enableOnExit = EditorGUILayout.Toggle (_hapticZone.enableOnExit, GUILayout.Width(16));
|
||||
EditorGUILayout.LabelField ("On Exit", GUILayout.Width(150));
|
||||
GUILayout.EndHorizontal ();
|
||||
|
||||
if (_hapticZone.enableOnExit)
|
||||
{
|
||||
GUILayout.BeginHorizontal();
|
||||
GUILayout.BeginVertical("GroupBox");
|
||||
|
||||
_hapticZone.onExitIntensity = EditorGUILayout.Slider("Intensity", _hapticZone.onExitIntensity, 0f, 1f);
|
||||
|
||||
GUILayout.EndVertical ();
|
||||
GUILayout.EndHorizontal ();
|
||||
}
|
||||
|
||||
GUILayout.EndVertical();
|
||||
}
|
||||
}
|
||||
}
|
11
Assets/ABI.CCK/Scripts/Editor/CCK_CVRHapticZoneEditor.cs.meta
Executable file
11
Assets/ABI.CCK/Scripts/Editor/CCK_CVRHapticZoneEditor.cs.meta
Executable file
|
@ -0,0 +1,11 @@
|
|||
fileFormatVersion: 2
|
||||
guid: a20c15de10fd4cc597d67a34c37fa9ec
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
1047
Assets/ABI.CCK/Scripts/Editor/CCK_CVRInteractableEditor.cs
Executable file
1047
Assets/ABI.CCK/Scripts/Editor/CCK_CVRInteractableEditor.cs
Executable file
File diff suppressed because it is too large
Load diff
11
Assets/ABI.CCK/Scripts/Editor/CCK_CVRInteractableEditor.cs.meta
Executable file
11
Assets/ABI.CCK/Scripts/Editor/CCK_CVRInteractableEditor.cs.meta
Executable file
|
@ -0,0 +1,11 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 748e23d846751944d9f9db5790811171
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
367
Assets/ABI.CCK/Scripts/Editor/CCK_CVRObjectLibraryEditor.cs
Executable file
367
Assets/ABI.CCK/Scripts/Editor/CCK_CVRObjectLibraryEditor.cs
Executable file
|
@ -0,0 +1,367 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using ABI.CCK.Components;
|
||||
using UnityEditor;
|
||||
using UnityEditorInternal;
|
||||
using UnityEngine;
|
||||
|
||||
namespace ABI.CCK.Scripts.Editor
|
||||
{
|
||||
[CustomEditor(typeof(ABI.CCK.Components.CVRObjectLibrary)), CanEditMultipleObjects]
|
||||
public class CCK_CVRObjectLibraryEditor : UnityEditor.Editor
|
||||
{
|
||||
private CVRObjectLibrary _library;
|
||||
|
||||
private ReorderableList CategoryList = null;
|
||||
private CVRObjectCatalogCategory objectCatalogCategory = null;
|
||||
private List<string> popupListName = new List<string>();
|
||||
private List<string> popupListID = new List<string>();
|
||||
|
||||
private ReorderableList objectCatalogList = null;
|
||||
private CVRObjectCatalogEntry objectCatalogEntry = null;
|
||||
|
||||
public override void OnInspectorGUI()
|
||||
{
|
||||
if (_library == null) _library = (CVRObjectLibrary) target;
|
||||
|
||||
EditorGUILayout.LabelField("Object Library");
|
||||
|
||||
InitializeCategoryList();
|
||||
CategoryList.DoLayoutList();
|
||||
popupListName.Clear();
|
||||
popupListID.Clear();
|
||||
foreach (var category in _library.objectCatalogCategories)
|
||||
{
|
||||
if (string.IsNullOrEmpty(category.id)) category.id = "b~" + System.Guid.NewGuid().ToString();
|
||||
popupListName.Add(string.IsNullOrEmpty(category.name) ? "-" : category.name);
|
||||
popupListID.Add(category.id);
|
||||
}
|
||||
|
||||
EditorGUILayout.Space();
|
||||
|
||||
InitializeObjectCatalogList();
|
||||
objectCatalogList.displayAdd = _library.objectCatalogCategories.Count > 0;
|
||||
objectCatalogList.DoLayoutList();
|
||||
}
|
||||
|
||||
private void InitializeCategoryList()
|
||||
{
|
||||
if (CategoryList != null) return;
|
||||
|
||||
CategoryList = new ReorderableList(_library.objectCatalogCategories, typeof(CVRObjectCatalogCategory),
|
||||
false, true, true, true);
|
||||
CategoryList.drawHeaderCallback = OnDrawHeaderCategory;
|
||||
CategoryList.drawElementCallback = OnDrawElementCategory;
|
||||
CategoryList.elementHeightCallback = OnHeightElementCategory;
|
||||
CategoryList.onChangedCallback = OnChangedCategory;
|
||||
}
|
||||
|
||||
private void OnDrawHeaderCategory(Rect rect)
|
||||
{
|
||||
Rect _rect = new Rect(rect.x, rect.y, rect.width, EditorGUIUtility.singleLineHeight);
|
||||
|
||||
GUI.Label(_rect, "Categories");
|
||||
}
|
||||
|
||||
private void OnDrawElementCategory(Rect rect, int index, bool isactive, bool isfocused)
|
||||
{
|
||||
if (index > _library.objectCatalogCategories.Count) return;
|
||||
objectCatalogCategory = _library.objectCatalogCategories[index];
|
||||
|
||||
Rect _rect = new Rect(rect.x + 50, rect.y, 50, EditorGUIUtility.singleLineHeight);
|
||||
Rect initialRect = rect;
|
||||
|
||||
EditorGUI.LabelField(_rect, "Name");
|
||||
_rect.x += 50;
|
||||
_rect.width = rect.width - 50 - 50;
|
||||
|
||||
objectCatalogCategory.name = EditorGUI.TextField(_rect, objectCatalogCategory.name);
|
||||
|
||||
rect.y += EditorGUIUtility.singleLineHeight * 1.25f;
|
||||
_rect = new Rect(rect.x + 50, rect.y, 50, EditorGUIUtility.singleLineHeight);
|
||||
|
||||
EditorGUI.LabelField(_rect, "Image");
|
||||
_rect.x += 50;
|
||||
_rect.width = rect.width - 50 - 50;
|
||||
|
||||
objectCatalogCategory.image = (Texture2D) EditorGUI.ObjectField(_rect, objectCatalogCategory.image, typeof(Texture2D));
|
||||
|
||||
if (objectCatalogCategory.image != null)
|
||||
{
|
||||
GUI.DrawTexture(new Rect(initialRect.x, initialRect.y, 42, 42), objectCatalogCategory.image);
|
||||
}
|
||||
}
|
||||
|
||||
private float OnHeightElementCategory(int index)
|
||||
{
|
||||
return EditorGUIUtility.singleLineHeight * 2.5f;
|
||||
}
|
||||
|
||||
private void OnChangedCategory(ReorderableList list)
|
||||
{
|
||||
EditorUtility.SetDirty(target);
|
||||
}
|
||||
|
||||
private void InitializeObjectCatalogList()
|
||||
{
|
||||
if (objectCatalogList != null) return;
|
||||
|
||||
objectCatalogList = new ReorderableList(_library.objectCatalogEntries, typeof(CVRObjectCatalogEntry),
|
||||
true, true, true, true);
|
||||
objectCatalogList.drawHeaderCallback = OnDrawHeaderEntry;
|
||||
objectCatalogList.drawElementCallback = OnDrawElementEntry;
|
||||
objectCatalogList.elementHeightCallback = OnHeightElementEntry;
|
||||
objectCatalogList.onChangedCallback = OnChangedEntry;
|
||||
}
|
||||
|
||||
private void OnDrawHeaderEntry(Rect rect)
|
||||
{
|
||||
Rect _rect = new Rect(rect.x, rect.y, rect.width, EditorGUIUtility.singleLineHeight);
|
||||
|
||||
GUI.Label(_rect, "Objects");
|
||||
}
|
||||
|
||||
private void OnDrawElementEntry(Rect rect, int index, bool isactive, bool isfocused)
|
||||
{
|
||||
if (index > _library.objectCatalogEntries.Count) return;
|
||||
objectCatalogEntry = _library.objectCatalogEntries[index];
|
||||
|
||||
while (objectCatalogEntry.guid == "")
|
||||
{
|
||||
var guid = "b~" + System.Guid.NewGuid().ToString();
|
||||
var guidValid = true;
|
||||
|
||||
foreach (var entry in _library.objectCatalogEntries)
|
||||
{
|
||||
if (entry.guid == guid) guidValid = false;
|
||||
}
|
||||
|
||||
if (!guidValid) continue;
|
||||
objectCatalogEntry.guid = guid;
|
||||
}
|
||||
|
||||
Rect _rect = new Rect(rect.x + 100, rect.y, 100, EditorGUIUtility.singleLineHeight);
|
||||
Rect initialRect = rect;
|
||||
|
||||
EditorGUI.LabelField(_rect, "Name");
|
||||
_rect.x += 60;
|
||||
_rect.width = rect.width - 160;
|
||||
|
||||
objectCatalogEntry.name = EditorGUI.TextField(_rect, objectCatalogEntry.name);
|
||||
|
||||
rect.y += EditorGUIUtility.singleLineHeight * 1.25f;
|
||||
_rect = new Rect(rect.x + 100, rect.y, 100, EditorGUIUtility.singleLineHeight);
|
||||
|
||||
EditorGUI.LabelField(_rect, "Prefab");
|
||||
_rect.x += 60;
|
||||
_rect.width = rect.width - 160;
|
||||
|
||||
objectCatalogEntry.prefab = (GameObject) EditorGUI.ObjectField(_rect, objectCatalogEntry.prefab, typeof(GameObject));
|
||||
|
||||
if (objectCatalogEntry.prefab != null)
|
||||
{
|
||||
var spawnable = objectCatalogEntry.prefab.GetComponent<CVRSpawnable>();
|
||||
var builder = objectCatalogEntry.prefab.GetComponent<CVRBuilderSpawnable>();
|
||||
|
||||
if (spawnable == null && builder == null) objectCatalogEntry.prefab = null;
|
||||
}
|
||||
|
||||
rect.y += EditorGUIUtility.singleLineHeight * 1.25f;
|
||||
_rect = new Rect(rect.x + 100, rect.y, 100, EditorGUIUtility.singleLineHeight);
|
||||
|
||||
EditorGUI.LabelField(_rect, "Category");
|
||||
_rect.x += 60;
|
||||
_rect.width = rect.width - 160;
|
||||
|
||||
var catIndex = popupListID.IndexOf(objectCatalogEntry.categoryId);
|
||||
catIndex = EditorGUI.Popup(_rect, catIndex, popupListName.ToArray());
|
||||
if (catIndex >= 0) objectCatalogEntry.categoryId = popupListID[catIndex];
|
||||
|
||||
rect.y += EditorGUIUtility.singleLineHeight * 1.25f;
|
||||
_rect = new Rect(rect.x + 100, rect.y, 100, EditorGUIUtility.singleLineHeight);
|
||||
|
||||
EditorGUI.LabelField(_rect, "Preview");
|
||||
_rect.x += 60;
|
||||
_rect.width = rect.width - 160;
|
||||
|
||||
objectCatalogEntry.preview = (Texture2D) EditorGUI.ObjectField(_rect, objectCatalogEntry.preview, typeof(Texture2D));
|
||||
|
||||
rect.y += EditorGUIUtility.singleLineHeight * 1.25f;
|
||||
_rect = new Rect(rect.x, rect.y, rect.width, EditorGUIUtility.singleLineHeight);
|
||||
|
||||
if (GUI.Button(_rect, "Generate Preview"))
|
||||
{
|
||||
GeneratePreviewImage(objectCatalogEntry);
|
||||
}
|
||||
|
||||
if (objectCatalogEntry.preview != null)
|
||||
{
|
||||
GUI.DrawTexture(new Rect(initialRect.x, initialRect.y, 88, 88), objectCatalogEntry.preview);
|
||||
}
|
||||
}
|
||||
|
||||
private void GeneratePreviewImage(CVRObjectCatalogEntry objectCatalogEntry)
|
||||
{
|
||||
if (objectCatalogEntry.prefab == null) return;
|
||||
|
||||
var path = "Assets/ABI.CCK/Resources/WorldObjectCatalog";
|
||||
var objectPosition = Vector3.down * 1000f;
|
||||
var rt = new RenderTexture(256, 256, 32);
|
||||
|
||||
if (!AssetDatabase.IsValidFolder(path))
|
||||
AssetDatabase.CreateFolder("Assets/ABI.CCK/Resources", "WorldObjectCatalog");
|
||||
|
||||
var obj = Instantiate(objectCatalogEntry.prefab, objectPosition, Quaternion.identity);
|
||||
|
||||
var renderers = obj.GetComponentsInChildren<Renderer>();
|
||||
Bounds b = new Bounds(Vector3.zero, Vector3.zero);
|
||||
|
||||
foreach (var renderer in renderers)
|
||||
{
|
||||
if (b.size.y == 0f)
|
||||
{
|
||||
b = renderer.bounds;
|
||||
}
|
||||
else
|
||||
{
|
||||
b.Encapsulate(renderer.bounds);
|
||||
}
|
||||
}
|
||||
|
||||
var transforms = obj.GetComponentsInChildren<Transform>();
|
||||
foreach (var transform in transforms)
|
||||
{
|
||||
transform.gameObject.layer = 12;
|
||||
}
|
||||
|
||||
var cam = new GameObject("Preview Capture", new[] {typeof(Camera), typeof(Light)}).GetComponent<Camera>();
|
||||
var light = cam.gameObject.GetComponent<Light>();
|
||||
light.type = LightType.Directional;
|
||||
light.cullingMask = 1 << 12;
|
||||
cam.aspect = 1f;
|
||||
cam.targetTexture = rt;
|
||||
cam.clearFlags = CameraClearFlags.Color;
|
||||
cam.backgroundColor = Color.black;
|
||||
cam.cullingMask = 1 << 12;
|
||||
|
||||
cam.transform.position = objectPosition + new Vector3(0f, b.extents.y, b.extents.y * 2f);
|
||||
cam.transform.eulerAngles = new Vector3(0f, 180f, 0f);
|
||||
Texture2D screenShot1 = new Texture2D(256, 256, TextureFormat.RGB24, false);
|
||||
cam.Render();
|
||||
RenderTexture.active = rt;
|
||||
screenShot1.ReadPixels(new Rect(0, 0, 256, 256), 0, 0);
|
||||
AssetDatabase.CreateAsset(screenShot1, path + "/ObjectCatalog_temp_1.asset");
|
||||
AssetDatabase.ImportAsset(path + "/ObjectCatalog_temp_1.asset", ImportAssetOptions.ForceUpdate);
|
||||
RenderTexture.active = null;
|
||||
|
||||
cam.transform.position = objectPosition + new Vector3(b.extents.y * 1.41f, b.extents.y, b.extents.y * 1.41f);
|
||||
cam.transform.eulerAngles = new Vector3(0f, 225f, 0f);
|
||||
Texture2D screenShot2 = new Texture2D(256, 256, TextureFormat.RGB24, false);
|
||||
cam.Render();
|
||||
RenderTexture.active = rt;
|
||||
screenShot2.ReadPixels(new Rect(0, 0, 256, 256), 0, 0);
|
||||
AssetDatabase.CreateAsset(screenShot2, path + "/ObjectCatalog_temp_2.asset");
|
||||
AssetDatabase.ImportAsset(path + "/ObjectCatalog_temp_2.asset", ImportAssetOptions.ForceUpdate);
|
||||
RenderTexture.active = null;
|
||||
|
||||
cam.transform.position = objectPosition + new Vector3(b.extents.y * 2f, b.extents.y, 0f);
|
||||
cam.transform.eulerAngles = new Vector3(0f, 270f, 0f);
|
||||
Texture2D screenShot3 = new Texture2D(256, 256, TextureFormat.RGB24, false);
|
||||
cam.Render();
|
||||
RenderTexture.active = rt;
|
||||
screenShot3.ReadPixels(new Rect(0, 0, 256, 256), 0, 0);
|
||||
AssetDatabase.CreateAsset(screenShot3, path + "/ObjectCatalog_temp_3.asset");
|
||||
AssetDatabase.ImportAsset(path + "/ObjectCatalog_temp_3.asset", ImportAssetOptions.ForceUpdate);
|
||||
RenderTexture.active = null;
|
||||
|
||||
cam.transform.position = objectPosition + new Vector3(b.extents.y * 1.41f, b.extents.y, b.extents.y * -1.41f);
|
||||
cam.transform.eulerAngles = new Vector3(0f, 315f, 0f);
|
||||
Texture2D screenShot4 = new Texture2D(256, 256, TextureFormat.RGB24, false);
|
||||
cam.Render();
|
||||
RenderTexture.active = rt;
|
||||
screenShot4.ReadPixels(new Rect(0, 0, 256, 256), 0, 0);
|
||||
AssetDatabase.CreateAsset(screenShot4, path + "/ObjectCatalog_temp_4.asset");
|
||||
AssetDatabase.ImportAsset(path + "/ObjectCatalog_temp_4.asset", ImportAssetOptions.ForceUpdate);
|
||||
RenderTexture.active = null;
|
||||
|
||||
cam.transform.position = objectPosition + new Vector3(0f, b.extents.y, b.extents.y * -2f);
|
||||
cam.transform.eulerAngles = new Vector3(0f, 0f, 0f);
|
||||
Texture2D screenShot5 = new Texture2D(256, 256, TextureFormat.RGB24, false);
|
||||
cam.Render();
|
||||
RenderTexture.active = rt;
|
||||
screenShot5.ReadPixels(new Rect(0, 0, 256, 256), 0, 0);
|
||||
AssetDatabase.CreateAsset(screenShot5, path + "/ObjectCatalog_temp_5.asset");
|
||||
AssetDatabase.ImportAsset(path + "/ObjectCatalog_temp_5.asset", ImportAssetOptions.ForceUpdate);
|
||||
RenderTexture.active = null;
|
||||
|
||||
cam.transform.position = objectPosition + new Vector3(b.extents.y * -1.41f, b.extents.y, b.extents.y * -1.41f);
|
||||
cam.transform.eulerAngles = new Vector3(0f, 45f, 0f);
|
||||
Texture2D screenShot6 = new Texture2D(256, 256, TextureFormat.RGB24, false);
|
||||
cam.Render();
|
||||
RenderTexture.active = rt;
|
||||
screenShot6.ReadPixels(new Rect(0, 0, 256, 256), 0, 0);
|
||||
AssetDatabase.CreateAsset(screenShot6, path + "/ObjectCatalog_temp_6.asset");
|
||||
AssetDatabase.ImportAsset(path + "/ObjectCatalog_temp_6.asset", ImportAssetOptions.ForceUpdate);
|
||||
RenderTexture.active = null;
|
||||
|
||||
cam.transform.position = objectPosition + new Vector3(b.extents.y * -2f, b.extents.y, 0f);
|
||||
cam.transform.eulerAngles = new Vector3(0f, 90f, 0f);
|
||||
Texture2D screenShot7 = new Texture2D(256, 256, TextureFormat.RGB24, false);
|
||||
cam.Render();
|
||||
RenderTexture.active = rt;
|
||||
screenShot7.ReadPixels(new Rect(0, 0, 256, 256), 0, 0);
|
||||
AssetDatabase.CreateAsset(screenShot7, path + "/ObjectCatalog_temp_7.asset");
|
||||
AssetDatabase.ImportAsset(path + "/ObjectCatalog_temp_7.asset", ImportAssetOptions.ForceUpdate);
|
||||
RenderTexture.active = null;
|
||||
|
||||
cam.transform.position = objectPosition + new Vector3(b.extents.y * -1.41f, b.extents.y, b.extents.y * 1.41f);
|
||||
cam.transform.eulerAngles = new Vector3(0f, 135f, 0f);
|
||||
Texture2D screenShot8 = new Texture2D(256, 256, TextureFormat.RGB24, false);
|
||||
cam.Render();
|
||||
RenderTexture.active = rt;
|
||||
screenShot8.ReadPixels(new Rect(0, 0, 256, 256), 0, 0);
|
||||
AssetDatabase.CreateAsset(screenShot8, path + "/ObjectCatalog_temp_8.asset");
|
||||
AssetDatabase.ImportAsset(path + "/ObjectCatalog_temp_8.asset", ImportAssetOptions.ForceUpdate);
|
||||
RenderTexture.active = null;
|
||||
|
||||
DestroyImmediate(obj);
|
||||
DestroyImmediate(cam.gameObject);
|
||||
|
||||
AssetDatabase.SaveAssets();
|
||||
AssetDatabase.Refresh();
|
||||
|
||||
WorldObjectCatalogPreviewSelector window = (WorldObjectCatalogPreviewSelector) EditorWindow.GetWindow (
|
||||
typeof(WorldObjectCatalogPreviewSelector),
|
||||
true,
|
||||
"Select Catalog Object Preview"
|
||||
);
|
||||
|
||||
window.objectCatalogEntry = objectCatalogEntry;
|
||||
window.previewOption1 = screenShot1;
|
||||
window.previewOption2 = screenShot2;
|
||||
window.previewOption3 = screenShot3;
|
||||
window.previewOption4 = screenShot4;
|
||||
window.previewOption5 = screenShot5;
|
||||
window.previewOption6 = screenShot6;
|
||||
window.previewOption7 = screenShot7;
|
||||
window.previewOption8 = screenShot8;
|
||||
|
||||
var scale = WorldObjectCatalogPreviewSelector.previewWindowScale;
|
||||
|
||||
window.minSize = new Vector2(1152 * scale, 576 * scale);
|
||||
window.maxSize = new Vector2(1152 * scale, 576 * scale);
|
||||
|
||||
window.Show();
|
||||
}
|
||||
|
||||
private float OnHeightElementEntry(int index)
|
||||
{
|
||||
return EditorGUIUtility.singleLineHeight * 6.25f;
|
||||
}
|
||||
|
||||
private void OnChangedEntry(ReorderableList list)
|
||||
{
|
||||
EditorUtility.SetDirty(target);
|
||||
}
|
||||
}
|
||||
}
|
3
Assets/ABI.CCK/Scripts/Editor/CCK_CVRObjectLibraryEditor.cs.meta
Executable file
3
Assets/ABI.CCK/Scripts/Editor/CCK_CVRObjectLibraryEditor.cs.meta
Executable file
|
@ -0,0 +1,3 @@
|
|||
fileFormatVersion: 2
|
||||
guid: c76a79943d5e4868b0dde5c509f543de
|
||||
timeCreated: 1630676300
|
262
Assets/ABI.CCK/Scripts/Editor/CCK_CVRParameterStream_Editor.cs
Executable file
262
Assets/ABI.CCK/Scripts/Editor/CCK_CVRParameterStream_Editor.cs
Executable file
|
@ -0,0 +1,262 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using ABI.CCK.Components;
|
||||
using UnityEditor;
|
||||
using UnityEditorInternal;
|
||||
using UnityEngine;
|
||||
using AnimatorControllerParameterType = UnityEngine.AnimatorControllerParameterType;
|
||||
|
||||
namespace ABI.CCK.Scripts.Editor
|
||||
{
|
||||
[CustomEditor(typeof(CVRParameterStream))]
|
||||
public class CCK_CVRParameterStream_Editor : UnityEditor.Editor
|
||||
{
|
||||
public static string[] coreParameters = {"MovementX", "MovementY", "Grounded", "Emote", "GestureLeft",
|
||||
"GestureRight", "Toggle", "Sitting", "Crouching", "CancelEmote", "Prone", "Flying"};
|
||||
|
||||
private CVRParameterStream stream;
|
||||
|
||||
private ReorderableList list;
|
||||
|
||||
private CVRAvatar avatar;
|
||||
private CVRSpawnable spawnable;
|
||||
|
||||
public override void OnInspectorGUI()
|
||||
{
|
||||
if (stream == null) stream = (CVRParameterStream) target;
|
||||
|
||||
stream.referenceType = CVRParameterStream.ReferenceType.World;
|
||||
|
||||
avatar = stream.transform.GetComponentInParent<CVRAvatar>();
|
||||
if (avatar != null) stream.referenceType = CVRParameterStream.ReferenceType.Avatar;
|
||||
|
||||
spawnable = stream.transform.GetComponentInParent<CVRSpawnable>();
|
||||
if (spawnable != null) stream.referenceType = CVRParameterStream.ReferenceType.Spawnable;
|
||||
|
||||
if (stream.referenceType != CVRParameterStream.ReferenceType.Avatar)
|
||||
{
|
||||
EditorGUILayout.HelpBox("This Component is currently only supported for usage on Avatars.", MessageType.Warning);
|
||||
return;
|
||||
}
|
||||
|
||||
if (list == null)
|
||||
{
|
||||
list = new ReorderableList(stream.entries, typeof(CVRParameterStreamEntry),
|
||||
true, true, true, true);
|
||||
list.drawHeaderCallback = DrawHeaderCallback;
|
||||
list.drawElementCallback = DrawElementCallback;
|
||||
list.elementHeightCallback = ElementHeightCallback;
|
||||
}
|
||||
|
||||
list.DoLayoutList();
|
||||
}
|
||||
|
||||
private float ElementHeightCallback(int index)
|
||||
{
|
||||
return EditorGUIUtility.singleLineHeight * 1.25f * (((int) stream.entries[index].applicationType % 5 == 1?5f:4f) +
|
||||
(stream.entries[index].targetType == CVRParameterStreamEntry.TargetType.Animator ? 1f : 0f));
|
||||
}
|
||||
|
||||
private void DrawElementCallback(Rect rect, int index, bool isactive, bool isfocused)
|
||||
{
|
||||
if (index >= stream.entries.Count) return;
|
||||
|
||||
rect.y += 2f;
|
||||
|
||||
switch (stream.referenceType)
|
||||
{
|
||||
case CVRParameterStream.ReferenceType.World:
|
||||
stream.entries[index].type = (CVRParameterStreamEntry.Type) EditorGUI.EnumPopup(
|
||||
new Rect(rect.x, rect.y, rect.width, EditorGUIUtility.singleLineHeight),
|
||||
"Type",
|
||||
stream.entries[index].type
|
||||
);
|
||||
|
||||
rect.y += EditorGUIUtility.singleLineHeight * 1.25f;
|
||||
|
||||
stream.entries[index].targetType = (CVRParameterStreamEntry.TargetType) EditorGUI.Popup(
|
||||
new Rect(rect.x, rect.y, rect.width, EditorGUIUtility.singleLineHeight),
|
||||
"Output Type",
|
||||
(int) stream.entries[index].targetType,
|
||||
new []{"Animator", "VariableBuffer"}
|
||||
);
|
||||
|
||||
rect.y += EditorGUIUtility.singleLineHeight * 1.25f;
|
||||
|
||||
stream.entries[index].target = (GameObject) EditorGUI.ObjectField(
|
||||
new Rect(rect.x, rect.y, rect.width, EditorGUIUtility.singleLineHeight),
|
||||
"Target",
|
||||
stream.entries[index].target,
|
||||
typeof(GameObject),
|
||||
true
|
||||
);
|
||||
|
||||
if (stream.entries[index].target)
|
||||
{
|
||||
switch (stream.entries[index].targetType)
|
||||
{
|
||||
case CVRParameterStreamEntry.TargetType.Animator:
|
||||
var animator = stream.entries[index].target.GetComponent<Animator>();
|
||||
if (animator == null) stream.entries[index].target = null;
|
||||
break;
|
||||
case CVRParameterStreamEntry.TargetType.VariableBuffer:
|
||||
var varBuffer = stream.entries[index].target.GetComponent<CVRVariableBuffer>();
|
||||
if (varBuffer == null) stream.entries[index].target = null;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (stream.entries[index].target != null && stream.entries[index].targetType == CVRParameterStreamEntry.TargetType.Animator)
|
||||
{
|
||||
rect.y += EditorGUIUtility.singleLineHeight * 1.25f;
|
||||
|
||||
var _rect = new Rect(rect.x, rect.y, rect.width, EditorGUIUtility.singleLineHeight);
|
||||
|
||||
var animator = stream.entries[index].target.GetComponent<Animator>();
|
||||
|
||||
var parameters = new List<string>();
|
||||
parameters.Add("-none-");
|
||||
var parameterIndex = 0;
|
||||
if (animator != null)
|
||||
{
|
||||
if (animator.runtimeAnimatorController != null)
|
||||
{
|
||||
foreach (var parameter in ((UnityEditor.Animations.AnimatorController) animator.runtimeAnimatorController).parameters)
|
||||
{
|
||||
if (parameter.type == AnimatorControllerParameterType.Float ||
|
||||
parameter.type == AnimatorControllerParameterType.Int ||
|
||||
parameter.type == AnimatorControllerParameterType.Bool)
|
||||
{
|
||||
parameters.Add(parameter.name);
|
||||
}
|
||||
}
|
||||
|
||||
parameterIndex = parameters.FindIndex(match => match == stream.entries[index].parameterName);
|
||||
}
|
||||
}
|
||||
|
||||
if (parameterIndex < 0) parameterIndex = 0;
|
||||
|
||||
parameterIndex = EditorGUI.Popup(_rect, "Parameter", parameterIndex, parameters.ToArray());
|
||||
stream.entries[index].parameterName = parameters[parameterIndex];
|
||||
}
|
||||
break;
|
||||
|
||||
case CVRParameterStream.ReferenceType.Avatar:
|
||||
stream.entries[index].type = (CVRParameterStreamEntry.Type) EditorGUI.EnumPopup(
|
||||
new Rect(rect.x, rect.y, rect.width, EditorGUIUtility.singleLineHeight),
|
||||
"Type",
|
||||
stream.entries[index].type
|
||||
);
|
||||
|
||||
rect.y += EditorGUIUtility.singleLineHeight * 1.25f;
|
||||
|
||||
var _rectA = new Rect(rect.x, rect.y, rect.width, EditorGUIUtility.singleLineHeight);
|
||||
|
||||
EditorGUI.LabelField(_rectA, "Output Type", "AdvancedAvatarAnimator");
|
||||
|
||||
rect.y += EditorGUIUtility.singleLineHeight * 1.25f;
|
||||
|
||||
stream.entries[index].targetType = CVRParameterStreamEntry.TargetType.AvatarAnimator;
|
||||
|
||||
_rectA = new Rect(rect.x, rect.y, rect.width, EditorGUIUtility.singleLineHeight);
|
||||
|
||||
var parametersA = new List<string>();
|
||||
parametersA.Add("-none-");
|
||||
var parameterIndexA = 0;
|
||||
if (avatar != null)
|
||||
{
|
||||
if (avatar.overrides != null)
|
||||
{
|
||||
foreach (var parameter in ((UnityEditor.Animations.AnimatorController) avatar.overrides.runtimeAnimatorController).parameters)
|
||||
{
|
||||
if ((parameter.type == AnimatorControllerParameterType.Float ||
|
||||
parameter.type == AnimatorControllerParameterType.Int ||
|
||||
parameter.type == AnimatorControllerParameterType.Bool) &&
|
||||
!coreParameters.Contains(parameter.name))
|
||||
{
|
||||
parametersA.Add(parameter.name);
|
||||
}
|
||||
}
|
||||
|
||||
parameterIndexA = parametersA.FindIndex(match => match == stream.entries[index].parameterName);
|
||||
}
|
||||
}
|
||||
|
||||
if (parameterIndexA < 0) parameterIndexA = 0;
|
||||
|
||||
parameterIndexA = EditorGUI.Popup(_rectA, "Parameter", parameterIndexA, parametersA.ToArray());
|
||||
stream.entries[index].parameterName = parametersA[parameterIndexA];
|
||||
|
||||
rect.y += EditorGUIUtility.singleLineHeight * 1.25f;
|
||||
|
||||
stream.entries[index].applicationType = (CVRParameterStreamEntry.ApplicationType) EditorGUI.EnumPopup(
|
||||
new Rect(rect.x, rect.y, rect.width, EditorGUIUtility.singleLineHeight),
|
||||
"Value Application",
|
||||
stream.entries[index].applicationType
|
||||
);
|
||||
|
||||
if ((int) stream.entries[index].applicationType % 5 == 1)
|
||||
{
|
||||
rect.y += EditorGUIUtility.singleLineHeight * 1.25f;
|
||||
stream.entries[index].staticValue = EditorGUI.FloatField(
|
||||
new Rect(rect.x, rect.y, rect.width, EditorGUIUtility.singleLineHeight),
|
||||
"Static Value",
|
||||
stream.entries[index].staticValue
|
||||
);
|
||||
}
|
||||
|
||||
break;
|
||||
|
||||
case CVRParameterStream.ReferenceType.Spawnable:
|
||||
stream.entries[index].type = (CVRParameterStreamEntry.Type) EditorGUI.EnumPopup(
|
||||
new Rect(rect.x, rect.y, rect.width, EditorGUIUtility.singleLineHeight),
|
||||
"Type",
|
||||
stream.entries[index].type
|
||||
);
|
||||
|
||||
rect.y += EditorGUIUtility.singleLineHeight * 1.25f;
|
||||
|
||||
var _rectB = new Rect(rect.x, rect.y, rect.width, EditorGUIUtility.singleLineHeight);
|
||||
|
||||
EditorGUI.LabelField(_rectB, "Output Type", "SpawnableCustomFloat");
|
||||
|
||||
rect.y += EditorGUIUtility.singleLineHeight * 1.25f;
|
||||
|
||||
stream.entries[index].targetType = CVRParameterStreamEntry.TargetType.CustomFloat;
|
||||
|
||||
_rectB = new Rect(rect.x, rect.y, rect.width, EditorGUIUtility.singleLineHeight);
|
||||
|
||||
var parametersB = new List<string>();
|
||||
parametersB.Add("-none-");
|
||||
var parameterIndexB = 0;
|
||||
if (spawnable != null)
|
||||
{
|
||||
foreach (var parameter in spawnable.syncValues)
|
||||
{
|
||||
if (!String.IsNullOrWhiteSpace(parameter.name))
|
||||
{
|
||||
parametersB.Add(parameter.name);
|
||||
}
|
||||
}
|
||||
|
||||
parameterIndexB = parametersB.FindIndex(match => match == stream.entries[index].parameterName);
|
||||
}
|
||||
|
||||
if (parameterIndexB < 0) parameterIndexB = 0;
|
||||
|
||||
parameterIndexB = EditorGUI.Popup(_rectB, "Parameter", parameterIndexB, parametersB.ToArray());
|
||||
stream.entries[index].parameterName = parametersB[parameterIndexB];
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
private void DrawHeaderCallback(Rect rect)
|
||||
{
|
||||
Rect _rect = new Rect(rect.x, rect.y, rect.width, EditorGUIUtility.singleLineHeight);
|
||||
|
||||
GUI.Label(_rect, "Entries");
|
||||
}
|
||||
}
|
||||
}
|
3
Assets/ABI.CCK/Scripts/Editor/CCK_CVRParameterStream_Editor.cs.meta
Executable file
3
Assets/ABI.CCK/Scripts/Editor/CCK_CVRParameterStream_Editor.cs.meta
Executable file
|
@ -0,0 +1,3 @@
|
|||
fileFormatVersion: 2
|
||||
guid: ccf32f2df74b47f99d7e3910b3142b05
|
||||
timeCreated: 1625775851
|
28
Assets/ABI.CCK/Scripts/Editor/CCK_CVRPointerEditor.cs
Executable file
28
Assets/ABI.CCK/Scripts/Editor/CCK_CVRPointerEditor.cs
Executable file
|
@ -0,0 +1,28 @@
|
|||
using ABI.CCK.Components;
|
||||
using UnityEditor;
|
||||
using UnityEngine;
|
||||
#if CCK_ADDIN_MAGICACLOTHSUPPORT
|
||||
using MagicaCloth;
|
||||
#endif
|
||||
|
||||
namespace ABI.CCK.Scripts.Editor
|
||||
{
|
||||
[CustomEditor(typeof(ABI.CCK.Components.CVRPointer), true)]
|
||||
public class CCK_CVRPointerEditor : UnityEditor.Editor
|
||||
{
|
||||
public override void OnInspectorGUI()
|
||||
{
|
||||
base.OnInspectorGUI();
|
||||
#if CCK_ADDIN_MAGICACLOTHSUPPORT
|
||||
var components = ((CVRPointer) target).GetComponentsInParent<BaseCloth>();
|
||||
if (components.Length > 0)
|
||||
{
|
||||
EditorGUILayout.HelpBox(
|
||||
"A MagicaCloth component was detected on this Object or its parent. This can lead to pointers to not work as intended.",
|
||||
MessageType.Error
|
||||
);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
}
|
||||
}
|
3
Assets/ABI.CCK/Scripts/Editor/CCK_CVRPointerEditor.cs.meta
Executable file
3
Assets/ABI.CCK/Scripts/Editor/CCK_CVRPointerEditor.cs.meta
Executable file
|
@ -0,0 +1,3 @@
|
|||
fileFormatVersion: 2
|
||||
guid: aa2e8ef2abbd4a1a88e6ffd894337994
|
||||
timeCreated: 1630866666
|
309
Assets/ABI.CCK/Scripts/Editor/CCK_CVRSpawnableEditor.cs
Executable file
309
Assets/ABI.CCK/Scripts/Editor/CCK_CVRSpawnableEditor.cs
Executable file
|
@ -0,0 +1,309 @@
|
|||
using System.Collections.Generic;
|
||||
using ABI.CCK.Components;
|
||||
using UnityEditor;
|
||||
using UnityEditorInternal;
|
||||
using UnityEngine;
|
||||
using AnimatorControllerParameterType = UnityEngine.AnimatorControllerParameterType;
|
||||
|
||||
namespace ABI.CCK.Scripts.Editor
|
||||
{
|
||||
[CustomEditor(typeof(ABI.CCK.Components.CVRSpawnable), true)]
|
||||
public class CCK_CVRSpawnableEditor : UnityEditor.Editor
|
||||
{
|
||||
private CVRSpawnable _spawnable;
|
||||
private ReorderableList reorderableList;
|
||||
private ReorderableList subSyncList;
|
||||
private CVRSpawnableValue entity;
|
||||
private CVRSpawnableSubSync subSyncEntity;
|
||||
|
||||
private float SubSyncCosts = 0f;
|
||||
private bool outOfBoundsError = false;
|
||||
|
||||
private void InitializeList()
|
||||
{
|
||||
if (!_spawnable.useAdditionalValues) return;
|
||||
|
||||
reorderableList = new ReorderableList(_spawnable.syncValues, typeof(CVRAdvancedSettingsEntry), true, true, true, true);
|
||||
reorderableList.drawHeaderCallback = OnDrawHeader;
|
||||
reorderableList.drawElementCallback = OnDrawElement;
|
||||
reorderableList.elementHeightCallback = OnHeightElement;
|
||||
reorderableList.onAddCallback = OnAdd;
|
||||
reorderableList.onChangedCallback = OnChanged;
|
||||
}
|
||||
|
||||
private void InitializeSubSyncList()
|
||||
{
|
||||
if (!_spawnable.useAdditionalValues) return;
|
||||
|
||||
subSyncList = new ReorderableList(_spawnable.subSyncs, typeof(CVRSpawnableSubSync), false, true, true, true);
|
||||
subSyncList.drawHeaderCallback = OnDrawHeaderSubSync;
|
||||
subSyncList.drawElementCallback = OnDrawElementSubSync;
|
||||
subSyncList.elementHeightCallback = OnHeightElementSubSync;
|
||||
subSyncList.onAddCallback = OnAddSubSync;
|
||||
subSyncList.onChangedCallback = OnChangedSubSync;
|
||||
}
|
||||
|
||||
private void OnDrawHeaderSubSync(Rect rect)
|
||||
{
|
||||
Rect _rect = new Rect(rect.x, rect.y, rect.width, EditorGUIUtility.singleLineHeight);
|
||||
|
||||
GUI.Label(_rect, "Sub Sync Transforms");
|
||||
}
|
||||
|
||||
private void OnDrawElementSubSync(Rect rect, int index, bool isactive, bool isfocused)
|
||||
{
|
||||
if (index > _spawnable.subSyncs.Count) return;
|
||||
subSyncEntity = _spawnable.subSyncs[index];
|
||||
|
||||
rect.y += 2;
|
||||
Rect _rect = new Rect(rect.x, rect.y, 120, EditorGUIUtility.singleLineHeight);
|
||||
|
||||
EditorGUI.LabelField(_rect, "Transform");
|
||||
_rect.x += 120;
|
||||
_rect.width = rect.width - 120;
|
||||
subSyncEntity.transform = (Transform) EditorGUI.ObjectField(_rect, subSyncEntity.transform, typeof(Transform));
|
||||
|
||||
rect.y += EditorGUIUtility.singleLineHeight * 1.25f;
|
||||
_rect = new Rect(rect.x, rect.y, 120, EditorGUIUtility.singleLineHeight);
|
||||
|
||||
EditorGUI.LabelField(_rect, "Synced Properties");
|
||||
_rect.x += 120;
|
||||
_rect.width = rect.width - 120;
|
||||
subSyncEntity.syncedValues = (CVRSpawnableSubSync.SyncFlags) EditorGUI.EnumFlagsField(_rect, subSyncEntity.syncedValues);
|
||||
|
||||
rect.y += EditorGUIUtility.singleLineHeight * 1.25f;
|
||||
_rect = new Rect(rect.x, rect.y, 120, EditorGUIUtility.singleLineHeight);
|
||||
|
||||
EditorGUI.LabelField(_rect, "Sync Precision");
|
||||
_rect.x += 120;
|
||||
_rect.width = rect.width - 120;
|
||||
subSyncEntity.precision = (CVRSpawnableSubSync.SyncPrecision) EditorGUI.EnumPopup(_rect, subSyncEntity.precision);
|
||||
|
||||
if (subSyncEntity.precision == CVRSpawnableSubSync.SyncPrecision.Full) return;
|
||||
|
||||
if (subSyncEntity.transform != null &&
|
||||
(Mathf.Abs(subSyncEntity.transform.localPosition.x) > subSyncEntity.syncBoundary ||
|
||||
Mathf.Abs(subSyncEntity.transform.localPosition.y) > subSyncEntity.syncBoundary ||
|
||||
Mathf.Abs(subSyncEntity.transform.localPosition.z) > subSyncEntity.syncBoundary))
|
||||
{
|
||||
outOfBoundsError = true;
|
||||
}
|
||||
|
||||
rect.y += EditorGUIUtility.singleLineHeight * 1.25f;
|
||||
_rect = new Rect(rect.x, rect.y, 120, EditorGUIUtility.singleLineHeight);
|
||||
|
||||
EditorGUI.LabelField(_rect, "Sync Boundary");
|
||||
_rect.x += 120;
|
||||
_rect.width = rect.width - 120;
|
||||
subSyncEntity.syncBoundary = EditorGUI.FloatField(_rect, subSyncEntity.syncBoundary);
|
||||
}
|
||||
|
||||
private float OnHeightElementSubSync(int index)
|
||||
{
|
||||
if (_spawnable.subSyncs[index].precision == CVRSpawnableSubSync.SyncPrecision.Full) return EditorGUIUtility.singleLineHeight * 3.75f;
|
||||
return EditorGUIUtility.singleLineHeight * 5f;
|
||||
}
|
||||
|
||||
private void OnAddSubSync(ReorderableList list)
|
||||
{
|
||||
if (_spawnable.subSyncs.Count < 40)
|
||||
{
|
||||
_spawnable.subSyncs.Add(new CVRSpawnableSubSync());
|
||||
Repaint();
|
||||
}
|
||||
}
|
||||
|
||||
private void OnChangedSubSync(ReorderableList list)
|
||||
{
|
||||
//EditorUtility.SetDirty(target);
|
||||
}
|
||||
|
||||
private void OnChanged(ReorderableList list)
|
||||
{
|
||||
//EditorUtility.SetDirty(target);
|
||||
}
|
||||
|
||||
private void OnAdd(ReorderableList list)
|
||||
{
|
||||
if (_spawnable.syncValues.Count < 40)
|
||||
{
|
||||
_spawnable.syncValues.Add(new CVRSpawnableValue());
|
||||
Repaint();
|
||||
}
|
||||
}
|
||||
|
||||
private float OnHeightElement(int index)
|
||||
{
|
||||
return EditorGUIUtility.singleLineHeight * 7.5f;
|
||||
}
|
||||
|
||||
private void OnDrawElement(Rect rect, int index, bool isactive, bool isfocused)
|
||||
{
|
||||
if (index > _spawnable.syncValues.Count) return;
|
||||
entity = _spawnable.syncValues[index];
|
||||
|
||||
rect.y += 2;
|
||||
Rect _rect = new Rect(rect.x, rect.y, 120, EditorGUIUtility.singleLineHeight);
|
||||
|
||||
EditorGUI.LabelField(_rect, "Name");
|
||||
_rect.x += 120;
|
||||
_rect.width = rect.width - 120;
|
||||
entity.name = EditorGUI.TextField(_rect, entity.name);
|
||||
|
||||
rect.y += EditorGUIUtility.singleLineHeight * 1.25f;
|
||||
_rect = new Rect(rect.x, rect.y, 120, EditorGUIUtility.singleLineHeight);
|
||||
|
||||
EditorGUI.LabelField(_rect, "Start Value");
|
||||
_rect.x += 120;
|
||||
_rect.width = rect.width - 120;
|
||||
entity.startValue = EditorGUI.FloatField(_rect, entity.startValue);
|
||||
|
||||
rect.y += EditorGUIUtility.singleLineHeight * 1.25f;
|
||||
_rect = new Rect(rect.x, rect.y, 120, EditorGUIUtility.singleLineHeight);
|
||||
|
||||
EditorGUI.LabelField(_rect, "Update Type");
|
||||
_rect.x += 120;
|
||||
_rect.width = rect.width - 120;
|
||||
entity.updatedBy = (CVRSpawnableValue.UpdatedBy) EditorGUI.EnumPopup(_rect, entity.updatedBy);
|
||||
|
||||
rect.y += EditorGUIUtility.singleLineHeight * 1.25f;
|
||||
_rect = new Rect(rect.x, rect.y, 120, EditorGUIUtility.singleLineHeight);
|
||||
|
||||
EditorGUI.LabelField(_rect, "Update Method");
|
||||
_rect.x += 120;
|
||||
_rect.width = rect.width - 120;
|
||||
entity.updateMethod = (CVRSpawnableValue.UpdateMethod) EditorGUI.EnumPopup(_rect, entity.updateMethod);
|
||||
|
||||
rect.y += EditorGUIUtility.singleLineHeight * 1.25f;
|
||||
_rect = new Rect(rect.x, rect.y, 120, EditorGUIUtility.singleLineHeight);
|
||||
|
||||
EditorGUI.LabelField(_rect, "Connected Animator");
|
||||
_rect.x += 120;
|
||||
_rect.width = rect.width - 120;
|
||||
entity.animator = (Animator) EditorGUI.ObjectField(_rect, entity.animator, typeof(Animator));
|
||||
|
||||
rect.y += EditorGUIUtility.singleLineHeight * 1.25f;
|
||||
_rect = new Rect(rect.x, rect.y, 120, EditorGUIUtility.singleLineHeight);
|
||||
|
||||
EditorGUI.LabelField(_rect, "Animator Parameter");
|
||||
_rect.x += 120;
|
||||
_rect.width = rect.width - 120;
|
||||
|
||||
var parameters = new List<string>();
|
||||
parameters.Add("-none-");
|
||||
var parameterIndex = 0;
|
||||
if (entity.animator != null)
|
||||
{
|
||||
if (entity.animator.runtimeAnimatorController != null)
|
||||
{
|
||||
foreach (var parameter in ((UnityEditor.Animations.AnimatorController) entity.animator.runtimeAnimatorController).parameters)
|
||||
{
|
||||
if (parameter.type == AnimatorControllerParameterType.Float)
|
||||
{
|
||||
parameters.Add(parameter.name);
|
||||
}
|
||||
}
|
||||
|
||||
parameterIndex = parameters.FindIndex(match => match == entity.animatorParameterName);
|
||||
}
|
||||
}
|
||||
|
||||
if (parameterIndex < 0) parameterIndex = 0;
|
||||
|
||||
parameterIndex = EditorGUI.Popup(_rect, parameterIndex, parameters.ToArray());
|
||||
entity.animatorParameterName = parameters[parameterIndex];
|
||||
}
|
||||
|
||||
private void OnDrawHeader(Rect rect)
|
||||
{
|
||||
Rect _rect = new Rect(rect.x, rect.y, rect.width, EditorGUIUtility.singleLineHeight);
|
||||
|
||||
GUI.Label(_rect, "Values");
|
||||
}
|
||||
|
||||
public void UpdateSubSyncCosts()
|
||||
{
|
||||
SubSyncCosts = 0f;
|
||||
|
||||
foreach (var subSync in _spawnable.subSyncs)
|
||||
{
|
||||
if (subSync.syncedValues.HasFlag(CVRSpawnableSubSync.SyncFlags.TransformX))
|
||||
SubSyncCosts += (int) subSync.precision / 4f;
|
||||
if (subSync.syncedValues.HasFlag(CVRSpawnableSubSync.SyncFlags.TransformY))
|
||||
SubSyncCosts += (int) subSync.precision / 4f;
|
||||
if (subSync.syncedValues.HasFlag(CVRSpawnableSubSync.SyncFlags.TransformZ))
|
||||
SubSyncCosts += (int) subSync.precision / 4f;
|
||||
if (subSync.syncedValues.HasFlag(CVRSpawnableSubSync.SyncFlags.RotationX))
|
||||
SubSyncCosts += (int) subSync.precision / 4f;
|
||||
if (subSync.syncedValues.HasFlag(CVRSpawnableSubSync.SyncFlags.RotationY))
|
||||
SubSyncCosts += (int) subSync.precision / 4f;
|
||||
if (subSync.syncedValues.HasFlag(CVRSpawnableSubSync.SyncFlags.RotationZ))
|
||||
SubSyncCosts += (int) subSync.precision / 4f;
|
||||
}
|
||||
}
|
||||
|
||||
public override void OnInspectorGUI()
|
||||
{
|
||||
if (_spawnable == null) _spawnable = (CVRSpawnable) target;
|
||||
|
||||
EditorGUI.BeginChangeCheck();
|
||||
|
||||
_spawnable.spawnHeight = EditorGUILayout.FloatField("Spawn Height", _spawnable.spawnHeight);
|
||||
|
||||
_spawnable.propPrivacy = (CVRSpawnable.PropPrivacy) EditorGUILayout.EnumPopup("Prop Usage", _spawnable.propPrivacy);
|
||||
|
||||
GUILayout.BeginVertical("HelpBox");
|
||||
|
||||
GUILayout.BeginHorizontal ();
|
||||
_spawnable.useAdditionalValues = EditorGUILayout.Toggle (_spawnable.useAdditionalValues, GUILayout.Width(16));
|
||||
EditorGUILayout.LabelField ("Enable Sync Values", GUILayout.Width(250));
|
||||
GUILayout.EndHorizontal ();
|
||||
|
||||
if (_spawnable.useAdditionalValues)
|
||||
{
|
||||
UpdateSubSyncCosts();
|
||||
|
||||
GUILayout.BeginHorizontal();
|
||||
GUILayout.BeginVertical("GroupBox");
|
||||
|
||||
var SyncCost = _spawnable.syncValues.Count + SubSyncCosts;
|
||||
|
||||
Rect _rect = EditorGUILayout.GetControlRect(false, EditorGUIUtility.singleLineHeight);
|
||||
EditorGUI.ProgressBar(_rect, SyncCost / 40f, Mathf.CeilToInt(SyncCost) + " of 40 Synced Parameter Slots used");
|
||||
EditorGUILayout.Space();
|
||||
|
||||
if (SubSyncCosts > 0f)
|
||||
{
|
||||
EditorGUILayout.HelpBox(SubSyncCosts.ToString("F2")+" Values are used for Sub Sync Transforms", MessageType.Info);
|
||||
EditorGUILayout.Space();
|
||||
}
|
||||
|
||||
if (reorderableList == null) InitializeList();
|
||||
reorderableList.displayAdd = SyncCost <= 39f;
|
||||
reorderableList.DoLayoutList();
|
||||
|
||||
EditorGUILayout.Space();
|
||||
|
||||
outOfBoundsError = false;
|
||||
if (subSyncList == null) InitializeSubSyncList();
|
||||
subSyncList.displayAdd = SyncCost <= 39f;
|
||||
subSyncList.DoLayoutList();
|
||||
|
||||
GUILayout.EndVertical();
|
||||
GUILayout.EndHorizontal();
|
||||
}
|
||||
|
||||
GUILayout.EndVertical();
|
||||
|
||||
if (outOfBoundsError)
|
||||
{
|
||||
EditorGUILayout.HelpBox("A Sub Sync Transform is out of bounds by default. This object will snap to its bounds, when it is being synced.", MessageType.Error);
|
||||
}
|
||||
|
||||
if (EditorGUI.EndChangeCheck())
|
||||
{
|
||||
EditorUtility.SetDirty(_spawnable);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
11
Assets/ABI.CCK/Scripts/Editor/CCK_CVRSpawnableEditor.cs.meta
Executable file
11
Assets/ABI.CCK/Scripts/Editor/CCK_CVRSpawnableEditor.cs.meta
Executable file
|
@ -0,0 +1,11 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 0ca17d4301024feca46190e9e0dae76e
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
345
Assets/ABI.CCK/Scripts/Editor/CCK_CVRSpawnableTriggerEditor.cs
Executable file
345
Assets/ABI.CCK/Scripts/Editor/CCK_CVRSpawnableTriggerEditor.cs
Executable file
|
@ -0,0 +1,345 @@
|
|||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using ABI.CCK.Components;
|
||||
using UnityEditor;
|
||||
using UnityEditorInternal;
|
||||
using UnityEngine;
|
||||
using AnimatorController = UnityEditor.Animations.AnimatorController;
|
||||
using AnimatorControllerParameterType = UnityEngine.AnimatorControllerParameterType;
|
||||
|
||||
namespace ABI.CCK.Scripts.Editor
|
||||
{
|
||||
[CustomEditor(typeof(CVRSpawnableTrigger))]
|
||||
public class CCK_CVRSpawnableTriggerEditor : UnityEditor.Editor
|
||||
{
|
||||
private CVRSpawnableTrigger trigger;
|
||||
private CVRSpawnableTriggerTask enterEntity;
|
||||
private CVRSpawnableTriggerTask exitEntity;
|
||||
private CVRSpawnableTriggerTaskStay stayEntity;
|
||||
private ReorderableList _onEnterList;
|
||||
private ReorderableList _onExitList;
|
||||
private ReorderableList _onStayList;
|
||||
private List<string> spawnableParameters;
|
||||
|
||||
public override void OnInspectorGUI()
|
||||
{
|
||||
trigger = (CVRSpawnableTrigger) target;
|
||||
var spawnable = trigger.GetComponentInParent<CVRSpawnable>();
|
||||
|
||||
if (spawnable == null)
|
||||
{
|
||||
EditorGUILayout.HelpBox("No CVRSpawnable was detected for this Trigger.", MessageType.Error);
|
||||
return;
|
||||
}
|
||||
|
||||
spawnableParameters = new List<string>();
|
||||
spawnableParameters.Add("-none-");
|
||||
|
||||
if (!spawnable.useAdditionalValues)
|
||||
{
|
||||
EditorGUILayout.HelpBox("The detected Spawnable does not use additional Values.", MessageType.Error);
|
||||
return;
|
||||
}
|
||||
else
|
||||
{
|
||||
foreach (var syncValue in spawnable.syncValues)
|
||||
{
|
||||
spawnableParameters.Add(syncValue.name);
|
||||
}
|
||||
}
|
||||
|
||||
var triggers = trigger.GetComponents<CVRSpawnableTrigger>();
|
||||
|
||||
if (triggers.Length > 1)
|
||||
{
|
||||
EditorGUILayout.HelpBox(CCKLocalizationProvider.GetLocalizedText("ABI_UI_ADVAVTR_TRIGGER_MULTIPLE_TRIGGER_HELPBOX"), MessageType.Error);
|
||||
}
|
||||
|
||||
trigger.areaSize = EditorGUILayout.Vector3Field("Area Size", trigger.areaSize);
|
||||
|
||||
trigger.areaOffset = EditorGUILayout.Vector3Field("Area Offset", trigger.areaOffset);
|
||||
|
||||
if (!trigger.useAdvancedTrigger)
|
||||
{
|
||||
trigger.settingIndex = EditorGUILayout.Popup("Parameter", trigger.settingIndex + 1, spawnableParameters.ToArray()) - 1;
|
||||
|
||||
trigger.settingValue = EditorGUILayout.FloatField("Setting Value", trigger.settingValue);
|
||||
|
||||
trigger.useAdvancedTrigger = EditorGUILayout.Toggle("Enabled Advanced Mode", trigger.useAdvancedTrigger);
|
||||
}
|
||||
else
|
||||
{
|
||||
trigger.useAdvancedTrigger = EditorGUILayout.Toggle("Enabled Advanced Mode", trigger.useAdvancedTrigger);
|
||||
|
||||
var list = serializedObject.FindProperty("allowedTypes");
|
||||
EditorGUILayout.PropertyField(list, new GUIContent("Allowed Types"), true);
|
||||
serializedObject.ApplyModifiedProperties();
|
||||
|
||||
EditorGUILayout.HelpBox(CCKLocalizationProvider.GetLocalizedText("ABI_UI_ADVAVTR_TRIGGER_ALLOWED_TYPES_HELPBOX"), MessageType.Info);
|
||||
|
||||
trigger.allowParticleInteraction = EditorGUILayout.Toggle("Enabled Particle Interaction", trigger.allowParticleInteraction);
|
||||
|
||||
EditorGUILayout.HelpBox(CCKLocalizationProvider.GetLocalizedText("ABI_UI_ADVAVTR_TRIGGER_PARTICLE_HELPBOX"), MessageType.Info);
|
||||
|
||||
if (_onEnterList == null)
|
||||
{
|
||||
_onEnterList = new ReorderableList(trigger.enterTasks, typeof(CVRSpawnableTriggerTask),
|
||||
false, true, true, true);
|
||||
_onEnterList.drawHeaderCallback = OnDrawHeaderEnter;
|
||||
_onEnterList.drawElementCallback = OnDrawElementEnter;
|
||||
_onEnterList.elementHeightCallback = OnHeightElementEnter;
|
||||
_onEnterList.onAddCallback = OnAddEnter;
|
||||
_onEnterList.onChangedCallback = OnChangedEnter;
|
||||
}
|
||||
|
||||
_onEnterList.DoLayoutList();
|
||||
|
||||
if (_onExitList == null)
|
||||
{
|
||||
_onExitList = new ReorderableList(trigger.exitTasks, typeof(CVRSpawnableTriggerTask),
|
||||
false, true, true, true);
|
||||
_onExitList.drawHeaderCallback = OnDrawHeaderExit;
|
||||
_onExitList.drawElementCallback = OnDrawElementExit;
|
||||
_onExitList.elementHeightCallback = OnHeightElementExit;
|
||||
_onExitList.onAddCallback = OnAddExit;
|
||||
_onExitList.onChangedCallback = OnChangedExit;
|
||||
}
|
||||
|
||||
_onExitList.DoLayoutList();
|
||||
|
||||
if (_onStayList == null)
|
||||
{
|
||||
_onStayList = new ReorderableList(trigger.stayTasks, typeof(CVRSpawnableTriggerTaskStay),
|
||||
false, true, true, true);
|
||||
_onStayList.drawHeaderCallback = OnDrawHeaderStay;
|
||||
_onStayList.drawElementCallback = OnDrawElementStay;
|
||||
_onStayList.elementHeightCallback = OnHeightElementStay;
|
||||
_onStayList.onAddCallback = OnAddStay;
|
||||
_onStayList.onChangedCallback = OnChangedStay;
|
||||
}
|
||||
|
||||
_onStayList.DoLayoutList();
|
||||
|
||||
if (trigger.stayTasks.Count > 0)
|
||||
{
|
||||
trigger.sampleDirection = (CVRSpawnableTrigger.SampleDirection)
|
||||
EditorGUILayout.EnumPopup("Sample Direction", trigger.sampleDirection);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void OnDrawHeaderEnter(Rect rect)
|
||||
{
|
||||
Rect _rect = new Rect(rect.x, rect.y, rect.width, EditorGUIUtility.singleLineHeight);
|
||||
|
||||
GUI.Label(_rect, "On Enter Trigger");
|
||||
}
|
||||
|
||||
private void OnDrawElementEnter(Rect rect, int index, bool isactive, bool isfocused)
|
||||
{
|
||||
if (index > trigger.enterTasks.Count) return;
|
||||
enterEntity = trigger.enterTasks[index];
|
||||
|
||||
Rect _rect = new Rect(rect.x, rect.y, 100, EditorGUIUtility.singleLineHeight);
|
||||
|
||||
EditorGUI.LabelField(_rect, "Parameter");
|
||||
_rect.x += 100;
|
||||
_rect.width = rect.width - 100;
|
||||
|
||||
enterEntity.settingIndex = EditorGUI.Popup(_rect, enterEntity.settingIndex + 1, spawnableParameters.ToArray()) - 1;
|
||||
|
||||
rect.y += EditorGUIUtility.singleLineHeight * 1.25f;
|
||||
_rect = new Rect(rect.x, rect.y, 100, EditorGUIUtility.singleLineHeight);
|
||||
|
||||
EditorGUI.LabelField(_rect, "Setting Value");
|
||||
_rect.x += 100;
|
||||
_rect.width = rect.width - 100;
|
||||
enterEntity.settingValue = EditorGUI.FloatField(_rect, enterEntity.settingValue);
|
||||
|
||||
rect.y += EditorGUIUtility.singleLineHeight * 1.25f;
|
||||
_rect = new Rect(rect.x, rect.y, 100, EditorGUIUtility.singleLineHeight);
|
||||
|
||||
EditorGUI.LabelField(_rect, "Delay");
|
||||
_rect.x += 100;
|
||||
_rect.width = rect.width - 100;
|
||||
enterEntity.delay = EditorGUI.FloatField(_rect, enterEntity.delay);
|
||||
|
||||
rect.y += EditorGUIUtility.singleLineHeight * 1.25f;
|
||||
_rect = new Rect(rect.x, rect.y, 100, EditorGUIUtility.singleLineHeight);
|
||||
|
||||
EditorGUI.LabelField(_rect, "Hold Time");
|
||||
_rect.x += 100;
|
||||
_rect.width = rect.width - 100;
|
||||
enterEntity.holdTime = EditorGUI.FloatField(_rect, enterEntity.holdTime);
|
||||
|
||||
rect.y += EditorGUIUtility.singleLineHeight * 1.25f;
|
||||
_rect = new Rect(rect.x, rect.y, 100, EditorGUIUtility.singleLineHeight);
|
||||
|
||||
EditorGUI.LabelField(_rect, "Update Method");
|
||||
_rect.x += 100;
|
||||
_rect.width = rect.width - 100;
|
||||
enterEntity.updateMethod = (CVRSpawnableTriggerTask.UpdateMethod) EditorGUI.EnumPopup(_rect, enterEntity.updateMethod);
|
||||
}
|
||||
|
||||
private float OnHeightElementEnter(int index)
|
||||
{
|
||||
return EditorGUIUtility.singleLineHeight * 6.25f;
|
||||
}
|
||||
|
||||
private void OnAddEnter(ReorderableList list)
|
||||
{
|
||||
trigger.enterTasks.Add(new CVRSpawnableTriggerTask());
|
||||
Repaint();
|
||||
}
|
||||
|
||||
private void OnChangedEnter(ReorderableList list)
|
||||
{
|
||||
//EditorUtility.SetDirty(target);
|
||||
}
|
||||
|
||||
private void OnDrawHeaderExit(Rect rect)
|
||||
{
|
||||
Rect _rect = new Rect(rect.x, rect.y, rect.width, EditorGUIUtility.singleLineHeight);
|
||||
|
||||
GUI.Label(_rect, "On Exit Trigger");
|
||||
}
|
||||
|
||||
private void OnDrawElementExit(Rect rect, int index, bool isactive, bool isfocused)
|
||||
{
|
||||
if (index > trigger.exitTasks.Count) return;
|
||||
exitEntity = trigger.exitTasks[index];
|
||||
|
||||
Rect _rect = new Rect(rect.x, rect.y, 100, EditorGUIUtility.singleLineHeight);
|
||||
|
||||
EditorGUI.LabelField(_rect, "Parameter");
|
||||
_rect.x += 100;
|
||||
_rect.width = rect.width - 100;
|
||||
|
||||
exitEntity.settingIndex = EditorGUI.Popup(_rect, exitEntity.settingIndex + 1, spawnableParameters.ToArray()) - 1;
|
||||
|
||||
rect.y += EditorGUIUtility.singleLineHeight * 1.25f;
|
||||
_rect = new Rect(rect.x, rect.y, 100, EditorGUIUtility.singleLineHeight);
|
||||
|
||||
EditorGUI.LabelField(_rect, "Setting Value");
|
||||
_rect.x += 100;
|
||||
_rect.width = rect.width - 100;
|
||||
exitEntity.settingValue = EditorGUI.FloatField(_rect, exitEntity.settingValue);
|
||||
|
||||
rect.y += EditorGUIUtility.singleLineHeight * 1.25f;
|
||||
_rect = new Rect(rect.x, rect.y, 100, EditorGUIUtility.singleLineHeight);
|
||||
|
||||
EditorGUI.LabelField(_rect, "Delay");
|
||||
_rect.x += 100;
|
||||
_rect.width = rect.width - 100;
|
||||
exitEntity.delay = EditorGUI.FloatField(_rect, exitEntity.delay);
|
||||
|
||||
rect.y += EditorGUIUtility.singleLineHeight * 1.25f;
|
||||
_rect = new Rect(rect.x, rect.y, 100, EditorGUIUtility.singleLineHeight);
|
||||
|
||||
EditorGUI.LabelField(_rect, "Update Method");
|
||||
_rect.x += 100;
|
||||
_rect.width = rect.width - 100;
|
||||
exitEntity.updateMethod = (CVRSpawnableTriggerTask.UpdateMethod) EditorGUI.EnumPopup(_rect, exitEntity.updateMethod);
|
||||
}
|
||||
|
||||
private float OnHeightElementExit(int index)
|
||||
{
|
||||
return EditorGUIUtility.singleLineHeight * 5f;
|
||||
}
|
||||
|
||||
private void OnAddExit(ReorderableList list)
|
||||
{
|
||||
trigger.exitTasks.Add(new CVRSpawnableTriggerTask());
|
||||
Repaint();
|
||||
}
|
||||
|
||||
private void OnChangedExit(ReorderableList list)
|
||||
{
|
||||
//EditorUtility.SetDirty(target);
|
||||
}
|
||||
|
||||
private void OnDrawHeaderStay(Rect rect)
|
||||
{
|
||||
Rect _rect = new Rect(rect.x, rect.y, rect.width, EditorGUIUtility.singleLineHeight);
|
||||
|
||||
GUI.Label(_rect, "On Stay Trigger");
|
||||
}
|
||||
|
||||
private void OnDrawElementStay(Rect rect, int index, bool isactive, bool isfocused)
|
||||
{
|
||||
if (index > trigger.stayTasks.Count) return;
|
||||
stayEntity = trigger.stayTasks[index];
|
||||
|
||||
Rect _rect = new Rect(rect.x, rect.y, 100, EditorGUIUtility.singleLineHeight);
|
||||
|
||||
EditorGUI.LabelField(_rect, "Parameter");
|
||||
_rect.x += 100;
|
||||
_rect.width = rect.width - 100;
|
||||
|
||||
stayEntity.settingIndex = EditorGUI.Popup(_rect, stayEntity.settingIndex + 1, spawnableParameters.ToArray()) - 1;
|
||||
|
||||
rect.y += EditorGUIUtility.singleLineHeight * 1.25f;
|
||||
_rect = new Rect(rect.x, rect.y, 100, EditorGUIUtility.singleLineHeight);
|
||||
|
||||
EditorGUI.LabelField(_rect, "Update Method");
|
||||
_rect.x += 100;
|
||||
_rect.width = rect.width - 100;
|
||||
|
||||
stayEntity.updateMethod = (CVRSpawnableTriggerTaskStay.UpdateMethod) EditorGUI.EnumPopup(_rect, stayEntity.updateMethod);
|
||||
|
||||
rect.y += EditorGUIUtility.singleLineHeight * 1.25f;
|
||||
_rect = new Rect(rect.x, rect.y, 100, EditorGUIUtility.singleLineHeight);
|
||||
|
||||
if (stayEntity.updateMethod == CVRSpawnableTriggerTaskStay.UpdateMethod.SetFromPosition)
|
||||
{
|
||||
EditorGUI.LabelField(_rect, "Min Value");
|
||||
_rect.x += 100;
|
||||
_rect.width = rect.width - 100;
|
||||
stayEntity.minValue = EditorGUI.FloatField(_rect, stayEntity.minValue);
|
||||
|
||||
rect.y += EditorGUIUtility.singleLineHeight * 1.25f;
|
||||
_rect = new Rect(rect.x, rect.y, 100, EditorGUIUtility.singleLineHeight);
|
||||
|
||||
EditorGUI.LabelField(_rect, "Max Value");
|
||||
_rect.x += 100;
|
||||
_rect.width = rect.width - 100;
|
||||
stayEntity.maxValue = EditorGUI.FloatField(_rect, stayEntity.maxValue);
|
||||
|
||||
rect.y += EditorGUIUtility.singleLineHeight * 1.25f;
|
||||
_rect = new Rect(rect.x, rect.y, 100, EditorGUIUtility.singleLineHeight);
|
||||
}
|
||||
else
|
||||
{
|
||||
EditorGUI.LabelField(_rect, "Change per sec");
|
||||
_rect.x += 100;
|
||||
_rect.width = rect.width - 100;
|
||||
stayEntity.minValue = EditorGUI.FloatField(_rect, stayEntity.minValue);
|
||||
|
||||
rect.y += EditorGUIUtility.singleLineHeight * 1.25f;
|
||||
_rect = new Rect(rect.x, rect.y, 100, EditorGUIUtility.singleLineHeight);
|
||||
}
|
||||
}
|
||||
|
||||
private float OnHeightElementStay(int index)
|
||||
{
|
||||
if (index > trigger.stayTasks.Count) return EditorGUIUtility.singleLineHeight * 3.75f;
|
||||
stayEntity = trigger.stayTasks[index];
|
||||
|
||||
if (stayEntity.updateMethod == CVRSpawnableTriggerTaskStay.UpdateMethod.SetFromPosition)
|
||||
return EditorGUIUtility.singleLineHeight * 5f;
|
||||
|
||||
return EditorGUIUtility.singleLineHeight * 3.75f;
|
||||
}
|
||||
|
||||
private void OnAddStay(ReorderableList list)
|
||||
{
|
||||
trigger.stayTasks.Add(new CVRSpawnableTriggerTaskStay());
|
||||
Repaint();
|
||||
}
|
||||
|
||||
private void OnChangedStay(ReorderableList list)
|
||||
{
|
||||
//EditorUtility.SetDirty(target);
|
||||
}
|
||||
}
|
||||
}
|
3
Assets/ABI.CCK/Scripts/Editor/CCK_CVRSpawnableTriggerEditor.cs.meta
Executable file
3
Assets/ABI.CCK/Scripts/Editor/CCK_CVRSpawnableTriggerEditor.cs.meta
Executable file
|
@ -0,0 +1,3 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 4dcff2475b474b429c3fe0ba380bbbea
|
||||
timeCreated: 1624750389
|
353
Assets/ABI.CCK/Scripts/Editor/CCK_CVRTexturePropertyParserEditor.cs
Executable file
353
Assets/ABI.CCK/Scripts/Editor/CCK_CVRTexturePropertyParserEditor.cs
Executable file
|
@ -0,0 +1,353 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Reflection;
|
||||
using ABI.CCK.Components;
|
||||
using UnityEditor;
|
||||
using UnityEditorInternal;
|
||||
using UnityEngine;
|
||||
|
||||
namespace ABI.CCK.Scripts.Editor
|
||||
{
|
||||
[CustomEditor(typeof(ABI.CCK.Components.CVRTexturePropertyParser), true)]
|
||||
public class CCK_CVRTexturePropertyParserEditor : UnityEditor.Editor
|
||||
{
|
||||
private CVRTexturePropertyParser _parser;
|
||||
private ReorderableList _list;
|
||||
|
||||
private CVRTexturePropertyParserTask _element;
|
||||
private static Dictionary<int, string[]> TypeAttributeList = new Dictionary<int, string[]>()
|
||||
{
|
||||
{3, new string[]{"X", "Y"}},
|
||||
{4, new string[]{"X", "Y", "Z"}},
|
||||
{5, new string[]{"X", "Y", "Z", "W"}},
|
||||
{6, new string[]{"R", "G", "B", "A"}}
|
||||
};
|
||||
|
||||
public override void OnInspectorGUI()
|
||||
{
|
||||
if (_parser == null) _parser = (CVRTexturePropertyParser) target;
|
||||
|
||||
EditorGUI.BeginChangeCheck();
|
||||
|
||||
CVRTexturePropertyParser.TextureType textureType = (CVRTexturePropertyParser.TextureType) EditorGUILayout.EnumPopup("Texture Type", _parser.textureType);
|
||||
|
||||
RenderTexture texture = null;
|
||||
string globalTextureName = "";
|
||||
if (textureType == CVRTexturePropertyParser.TextureType.LocalTexture)
|
||||
{
|
||||
texture = (RenderTexture) EditorGUILayout.ObjectField("Texture", _parser.texture, typeof(RenderTexture));
|
||||
}
|
||||
else
|
||||
{
|
||||
globalTextureName = EditorGUILayout.TextField("Texture Name", _parser.globalTextureName);
|
||||
}
|
||||
|
||||
if (EditorGUI.EndChangeCheck())
|
||||
{
|
||||
Undo.RecordObject(target, "Changed CVRTexturePropertyParser");
|
||||
|
||||
_parser.textureType = textureType;
|
||||
if (textureType == CVRTexturePropertyParser.TextureType.LocalTexture)
|
||||
{
|
||||
_parser.texture = texture;
|
||||
}
|
||||
else
|
||||
{
|
||||
_parser.globalTextureName = globalTextureName;
|
||||
}
|
||||
}
|
||||
|
||||
if (_list == null) InitializeList();
|
||||
_list.DoLayoutList();
|
||||
}
|
||||
|
||||
private void InitializeList()
|
||||
{
|
||||
_list = new ReorderableList(_parser.tasks, typeof(CVRTexturePropertyParserTask), false, true, true, true);
|
||||
_list.drawElementCallback = DrawElement;
|
||||
_list.drawHeaderCallback = DrawHeader;
|
||||
_list.elementHeightCallback = ElementHeight;
|
||||
}
|
||||
|
||||
private void DrawElement(Rect rect, int index, bool isactive, bool isfocused)
|
||||
{
|
||||
if (index >= _parser.tasks.Count) return;
|
||||
_element = _parser.tasks[index];
|
||||
|
||||
EditorGUI.BeginChangeCheck();
|
||||
|
||||
Rect _rect = new Rect(rect.x, rect.y, 100, EditorGUIUtility.singleLineHeight);
|
||||
EditorGUI.LabelField(_rect, "X Position");
|
||||
_rect.x += 100;
|
||||
_rect.width = rect.width - 100;
|
||||
int x = EditorGUI.IntField(_rect, _element.x);
|
||||
|
||||
rect.y += EditorGUIUtility.singleLineHeight * 1.25f;
|
||||
|
||||
_rect = new Rect(rect.x, rect.y, 100, EditorGUIUtility.singleLineHeight);
|
||||
EditorGUI.LabelField(_rect, "Y Position");
|
||||
_rect.x += 100;
|
||||
_rect.width = rect.width - 100;
|
||||
int y = EditorGUI.IntField(_rect, _element.y);
|
||||
|
||||
rect.y += EditorGUIUtility.singleLineHeight * 1.25f;
|
||||
|
||||
_rect = new Rect(rect.x, rect.y, 100, EditorGUIUtility.singleLineHeight);
|
||||
EditorGUI.LabelField(_rect, "Color Channel");
|
||||
_rect.x += 100;
|
||||
_rect.width = rect.width - 100;
|
||||
CVRTexturePropertyParserTask.Channel channel = (CVRTexturePropertyParserTask.Channel) EditorGUI.EnumPopup(_rect, _element.channel);
|
||||
|
||||
rect.y += EditorGUIUtility.singleLineHeight * 1.25f;
|
||||
|
||||
_rect = new Rect(rect.x, rect.y, 100, EditorGUIUtility.singleLineHeight);
|
||||
EditorGUI.LabelField(_rect, "Min Value");
|
||||
_rect.x += 100;
|
||||
_rect.width = rect.width - 100;
|
||||
float minValue = EditorGUI.FloatField(_rect, _element.minValue);
|
||||
|
||||
rect.y += EditorGUIUtility.singleLineHeight * 1.25f;
|
||||
|
||||
_rect = new Rect(rect.x, rect.y, 100, EditorGUIUtility.singleLineHeight);
|
||||
EditorGUI.LabelField(_rect, "Max Value");
|
||||
_rect.x += 100;
|
||||
_rect.width = rect.width - 100;
|
||||
float maxValue = EditorGUI.FloatField(_rect, _element.maxValue);
|
||||
|
||||
rect.y += EditorGUIUtility.singleLineHeight * 1.25f;
|
||||
|
||||
_rect = new Rect(rect.x, rect.y, 100, EditorGUIUtility.singleLineHeight);
|
||||
EditorGUI.LabelField(_rect, "Target");
|
||||
_rect.x += 100;
|
||||
_rect.width = rect.width - 100;
|
||||
GameObject target = (GameObject) EditorGUI.ObjectField(_rect, _element.target, typeof(GameObject));
|
||||
|
||||
if (target != _element.target) _element.component = null;
|
||||
|
||||
rect.y += EditorGUIUtility.singleLineHeight * 1.25f;
|
||||
|
||||
_rect = new Rect(rect.x, rect.y, 100, EditorGUIUtility.singleLineHeight);
|
||||
EditorGUI.LabelField(_rect, "Component");
|
||||
_rect.x += 100;
|
||||
_rect.width = rect.width - 100;
|
||||
|
||||
//Get Component
|
||||
List<Component> componentList = new List<Component>();
|
||||
List<Type> componentListTypes = new List<Type>();
|
||||
List<string> componentListNames = new List<string>();
|
||||
int selectedIndex = 0;
|
||||
Component component = null;
|
||||
|
||||
if (_element.target == null)
|
||||
{
|
||||
EditorGUI.HelpBox(_rect, "Select a Target.", MessageType.Info);
|
||||
}
|
||||
else
|
||||
{
|
||||
Component[] rawComponents = target.GetComponents<Component>();
|
||||
|
||||
foreach (var rawComponent in rawComponents)
|
||||
{
|
||||
if (rawComponent != null && !componentListTypes.Contains(rawComponent.GetType()) &&
|
||||
rawComponent.GetType() != typeof(CVRTexturePropertyParser))
|
||||
{
|
||||
componentListTypes.Add(rawComponent.GetType());
|
||||
componentListNames.Add(rawComponent.GetType().Name);
|
||||
componentList.Add(rawComponent);
|
||||
}
|
||||
}
|
||||
|
||||
selectedIndex = componentList.FindIndex(match => match == _element.component);
|
||||
|
||||
selectedIndex = EditorGUI.Popup(_rect, selectedIndex, componentListNames.ToArray());
|
||||
if (selectedIndex >= 0 && selectedIndex < componentListTypes.Count)
|
||||
{
|
||||
component = componentList[selectedIndex];
|
||||
}
|
||||
else
|
||||
{
|
||||
component = null;
|
||||
}
|
||||
}
|
||||
|
||||
rect.y += EditorGUIUtility.singleLineHeight * 1.25f;
|
||||
|
||||
_rect = new Rect(rect.x, rect.y, 100, EditorGUIUtility.singleLineHeight);
|
||||
EditorGUI.LabelField(_rect, "Property");
|
||||
_rect.x += 100;
|
||||
_rect.width = rect.width - 100;
|
||||
|
||||
//Get Component Property
|
||||
string propertyName = "";
|
||||
int propertyType = 0;
|
||||
int targetIndex = 0;
|
||||
|
||||
if (_element.component == null)
|
||||
{
|
||||
EditorGUI.HelpBox(_rect, "Select a Component to proceed.", MessageType.Info);
|
||||
}
|
||||
else
|
||||
{
|
||||
BindingFlags flags = BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.Default;
|
||||
FieldInfo[] finfos = componentListTypes[selectedIndex].GetFields(flags);
|
||||
PropertyInfo[] pinfos = componentListTypes[selectedIndex].GetProperties(flags);
|
||||
List<string> fieldListNames = new List<string>();
|
||||
List<string> fieldListDisplayNames = new List<string>();
|
||||
List<int> fieldTypes = new List<int>();
|
||||
selectedIndex = 0;
|
||||
|
||||
foreach (var finfo in finfos)
|
||||
{
|
||||
if (finfo.IsPublic)
|
||||
{
|
||||
if (finfo.FieldType == typeof(float))
|
||||
{
|
||||
fieldListNames.Add(finfo.Name);
|
||||
fieldListDisplayNames.Add(finfo.Name + " (float)");
|
||||
fieldTypes.Add(0);
|
||||
}
|
||||
else if (finfo.FieldType == typeof(int))
|
||||
{
|
||||
fieldListNames.Add(finfo.Name);
|
||||
fieldListDisplayNames.Add(finfo.Name + " (int)");
|
||||
fieldTypes.Add(1);
|
||||
}
|
||||
else if (finfo.FieldType == typeof(bool))
|
||||
{
|
||||
fieldListNames.Add(finfo.Name);
|
||||
fieldListDisplayNames.Add(finfo.Name + " (bool)");
|
||||
fieldTypes.Add(2);
|
||||
}
|
||||
else if (finfo.FieldType == typeof(Vector2))
|
||||
{
|
||||
fieldListNames.Add(finfo.Name);
|
||||
fieldListDisplayNames.Add(finfo.Name + " (Vector2)");
|
||||
fieldTypes.Add(3);
|
||||
}
|
||||
else if (finfo.FieldType == typeof(Vector3))
|
||||
{
|
||||
fieldListNames.Add(finfo.Name);
|
||||
fieldListDisplayNames.Add(finfo.Name + " (Vector3)");
|
||||
fieldTypes.Add(4);
|
||||
}
|
||||
else if (finfo.FieldType == typeof(Vector4))
|
||||
{
|
||||
fieldListNames.Add(finfo.Name);
|
||||
fieldListDisplayNames.Add(finfo.Name + " (Vector4)");
|
||||
fieldTypes.Add(5);
|
||||
}
|
||||
else if (finfo.FieldType == typeof(Color))
|
||||
{
|
||||
fieldListNames.Add(finfo.Name);
|
||||
fieldListDisplayNames.Add(finfo.Name + " (Color)");
|
||||
fieldTypes.Add(6);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
foreach (var pinfo in pinfos)
|
||||
{
|
||||
if (pinfo.CanWrite)
|
||||
{
|
||||
if (pinfo.PropertyType == typeof(float))
|
||||
{
|
||||
fieldListNames.Add(pinfo.Name);
|
||||
fieldListDisplayNames.Add(pinfo.Name + " (float)");
|
||||
fieldTypes.Add(0);
|
||||
}
|
||||
else if (pinfo.PropertyType == typeof(int))
|
||||
{
|
||||
fieldListNames.Add(pinfo.Name);
|
||||
fieldListDisplayNames.Add(pinfo.Name + " (int)");
|
||||
fieldTypes.Add(1);
|
||||
}
|
||||
else if (pinfo.PropertyType == typeof(bool))
|
||||
{
|
||||
fieldListNames.Add(pinfo.Name);
|
||||
fieldListDisplayNames.Add(pinfo.Name + " (bool)");
|
||||
fieldTypes.Add(2);
|
||||
}
|
||||
else if (pinfo.PropertyType == typeof(Vector2))
|
||||
{
|
||||
fieldListNames.Add(pinfo.Name);
|
||||
fieldListDisplayNames.Add(pinfo.Name + " (Vector2)");
|
||||
fieldTypes.Add(3);
|
||||
}
|
||||
else if (pinfo.PropertyType == typeof(Vector3))
|
||||
{
|
||||
fieldListNames.Add(pinfo.Name);
|
||||
fieldListDisplayNames.Add(pinfo.Name + " (Vector3)");
|
||||
fieldTypes.Add(4);
|
||||
}
|
||||
else if (pinfo.PropertyType == typeof(Vector4))
|
||||
{
|
||||
fieldListNames.Add(pinfo.Name);
|
||||
fieldListDisplayNames.Add(pinfo.Name + " (Vector4)");
|
||||
fieldTypes.Add(5);
|
||||
}
|
||||
else if (pinfo.PropertyType == typeof(Color))
|
||||
{
|
||||
fieldListNames.Add(pinfo.Name);
|
||||
fieldListDisplayNames.Add(pinfo.Name + " (Color)");
|
||||
fieldTypes.Add(6);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
selectedIndex = fieldListNames.FindIndex(match => match == _element.propertyName);
|
||||
|
||||
selectedIndex = EditorGUI.Popup(_rect, selectedIndex, fieldListDisplayNames.ToArray());
|
||||
if (selectedIndex >= 0 && selectedIndex < fieldListNames.Count)
|
||||
{
|
||||
propertyName = fieldListNames[selectedIndex];
|
||||
propertyType = fieldTypes[selectedIndex];
|
||||
}
|
||||
else
|
||||
{
|
||||
propertyName = "";
|
||||
propertyType = 0;
|
||||
}
|
||||
|
||||
if (propertyType >= 3)
|
||||
{
|
||||
rect.y += EditorGUIUtility.singleLineHeight * 1.25f;
|
||||
|
||||
_rect = new Rect(rect.x, rect.y, 100, EditorGUIUtility.singleLineHeight);
|
||||
EditorGUI.LabelField(_rect, "Target Attribute");
|
||||
_rect.x += 100;
|
||||
_rect.width = rect.width - 100;
|
||||
|
||||
targetIndex = EditorGUI.Popup(_rect, _element.targetIndex, TypeAttributeList[propertyType]);
|
||||
}
|
||||
}
|
||||
|
||||
if (EditorGUI.EndChangeCheck())
|
||||
{
|
||||
Undo.RecordObject(_parser, "Changed CVRTexturePropertyParser Task");
|
||||
|
||||
_element.x = x;
|
||||
_element.y = y;
|
||||
_element.channel = channel;
|
||||
_element.minValue = minValue;
|
||||
_element.maxValue = maxValue;
|
||||
_element.target = target;
|
||||
_element.component = component;
|
||||
_element.propertyName = propertyName;
|
||||
_element.typeIndex = propertyType;
|
||||
_element.targetIndex = targetIndex;
|
||||
}
|
||||
}
|
||||
|
||||
private float ElementHeight(int index)
|
||||
{
|
||||
return EditorGUIUtility.singleLineHeight * (_parser.tasks[index].typeIndex >= 3 ? 11.75f : 10.5f);
|
||||
}
|
||||
|
||||
private void DrawHeader(Rect rect)
|
||||
{
|
||||
Rect _rect = new Rect(rect.x, rect.y, rect.width, EditorGUIUtility.singleLineHeight);
|
||||
|
||||
GUI.Label(_rect, "Tasks");
|
||||
}
|
||||
}
|
||||
}
|
3
Assets/ABI.CCK/Scripts/Editor/CCK_CVRTexturePropertyParserEditor.cs.meta
Executable file
3
Assets/ABI.CCK/Scripts/Editor/CCK_CVRTexturePropertyParserEditor.cs.meta
Executable file
|
@ -0,0 +1,3 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 5d55003c047243968442f020280c3fc3
|
||||
timeCreated: 1646244492
|
21
Assets/ABI.CCK/Scripts/Editor/CCK_CVRToggleStateTriggerEditor.cs
Executable file
21
Assets/ABI.CCK/Scripts/Editor/CCK_CVRToggleStateTriggerEditor.cs
Executable file
|
@ -0,0 +1,21 @@
|
|||
using ABI.CCK.Components;
|
||||
using UnityEditor;
|
||||
|
||||
namespace ABI.CCK.Scripts.Editor
|
||||
{
|
||||
[CustomEditor(typeof(CVRToggleStateTrigger))]
|
||||
public class CCK_CVRToggleStateTriggerEditor : UnityEditor.Editor
|
||||
{
|
||||
public override void OnInspectorGUI()
|
||||
{
|
||||
var triggers = ((CVRToggleStateTrigger) target).GetComponents<CVRToggleStateTrigger>();
|
||||
|
||||
if (triggers.Length > 1)
|
||||
{
|
||||
EditorGUILayout.HelpBox("Having multiple Triggers on the same GameObject will lead to unpredictable behavior!", MessageType.Error);
|
||||
}
|
||||
|
||||
base.OnInspectorGUI();
|
||||
}
|
||||
}
|
||||
}
|
11
Assets/ABI.CCK/Scripts/Editor/CCK_CVRToggleStateTriggerEditor.cs.meta
Executable file
11
Assets/ABI.CCK/Scripts/Editor/CCK_CVRToggleStateTriggerEditor.cs.meta
Executable file
|
@ -0,0 +1,11 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 1e3cda82ec114396b1c548b185085268
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
168
Assets/ABI.CCK/Scripts/Editor/CCK_CVRTranslatableEditor.cs
Executable file
168
Assets/ABI.CCK/Scripts/Editor/CCK_CVRTranslatableEditor.cs
Executable file
|
@ -0,0 +1,168 @@
|
|||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using ABI.CCK.Components;
|
||||
using TMPro;
|
||||
using UnityEditor;
|
||||
using UnityEditorInternal;
|
||||
using UnityEngine;
|
||||
using UnityEngine.UI;
|
||||
|
||||
namespace ABI.CCK.Scripts.Editor
|
||||
{
|
||||
[CustomEditor(typeof(ABI.CCK.Components.CVRTranslatable))]
|
||||
public class CCK_CVRTranslatableEditor : UnityEditor.Editor
|
||||
{
|
||||
private CVRTranslatable _translatable;
|
||||
|
||||
private ReorderableList reorderableList;
|
||||
private CVRTranslatable.ObjectTranslatable_t entity;
|
||||
|
||||
private void InitializeList()
|
||||
{
|
||||
if (_translatable == null) return;
|
||||
|
||||
reorderableList = new ReorderableList(_translatable.Translatables, typeof(CVRTranslatable.ObjectTranslatable_t),
|
||||
true, true, true, true);
|
||||
reorderableList.drawHeaderCallback = OnDrawHeader;
|
||||
reorderableList.drawElementCallback = OnDrawElement;
|
||||
reorderableList.elementHeightCallback = OnHeightElement;
|
||||
reorderableList.onAddCallback = OnAdd;
|
||||
reorderableList.onChangedCallback = OnChanged;
|
||||
}
|
||||
|
||||
private void OnDrawElement(Rect rect, int index, bool isactive, bool isfocused)
|
||||
{
|
||||
if (index > _translatable.Translatables.Count) return;
|
||||
entity = _translatable.Translatables[index];
|
||||
rect.y += 2;
|
||||
rect.x += 12;
|
||||
rect.width -= 12;
|
||||
|
||||
EditorGUI.BeginChangeCheck();
|
||||
|
||||
Rect _rect = new Rect(rect.x, rect.y, 120, EditorGUIUtility.singleLineHeight);
|
||||
|
||||
EditorGUI.LabelField(_rect, "Type");
|
||||
_rect.x += 120;
|
||||
_rect.width = rect.width - 120;
|
||||
|
||||
entity.Type = (CVRTranslatable.TranslatableType) EditorGUI.EnumPopup(_rect, entity.Type);
|
||||
|
||||
if (entity.Type != CVRTranslatable.TranslatableType.GameObject)
|
||||
{
|
||||
rect.y += EditorGUIUtility.singleLineHeight * 1.25f;
|
||||
_rect = new Rect(rect.x, rect.y, 120, EditorGUIUtility.singleLineHeight);
|
||||
|
||||
EditorGUI.LabelField(_rect, "Component");
|
||||
_rect.x += 120;
|
||||
_rect.width = rect.width - 120;
|
||||
|
||||
switch (entity.Type)
|
||||
{
|
||||
case CVRTranslatable.TranslatableType.Text:
|
||||
entity.Text = (Text) EditorGUI.ObjectField(_rect, entity.Text, typeof(Text), true);
|
||||
break;
|
||||
#if CCK_ADDIN_TRANSLATABLE_TMP
|
||||
case CVRTranslatable.TranslatableType.TextMeshPro:
|
||||
entity.TmpText =
|
||||
(TMP_Text) EditorGUI.ObjectField(_rect, entity.TmpText, typeof(TMP_Text), true);
|
||||
break;
|
||||
#endif
|
||||
case CVRTranslatable.TranslatableType.AudioClip:
|
||||
entity.Source =
|
||||
(AudioSource) EditorGUI.ObjectField(_rect, entity.Source, typeof(AudioSource), true);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
rect.y += EditorGUIUtility.singleLineHeight * 1.25f;
|
||||
_rect = new Rect(rect.x, rect.y, 120, EditorGUIUtility.singleLineHeight);
|
||||
|
||||
EditorGUI.LabelField(_rect, "Fallback Language");
|
||||
_rect.x += 120;
|
||||
_rect.width = rect.width - 120;
|
||||
|
||||
var usedLanguages = new List<string>();
|
||||
var usedLanguagesNames = new List<string>();
|
||||
foreach (var translation in entity.Translations)
|
||||
{
|
||||
if (!usedLanguages.Contains(translation.Language))
|
||||
{
|
||||
var selectedUsedIndex = CVRTranslatable.Languages.Keys.ToList().FindIndex(match => match == translation.Language);
|
||||
usedLanguages.Add(translation.Language);
|
||||
usedLanguagesNames.Add(CVRTranslatable.Languages.Values.ToList()[selectedUsedIndex]);
|
||||
}
|
||||
}
|
||||
|
||||
var selectedIndex = usedLanguages.FindIndex(match => match == entity.FallbackLanguage);
|
||||
|
||||
selectedIndex = EditorGUI.Popup(_rect, selectedIndex, usedLanguagesNames.ToArray());
|
||||
|
||||
if (selectedIndex >= 0)
|
||||
{
|
||||
entity.FallbackLanguage = usedLanguages.ToArray()[selectedIndex];
|
||||
}
|
||||
else if (usedLanguages.Count > 0)
|
||||
{
|
||||
entity.FallbackLanguage = usedLanguages[0];
|
||||
}
|
||||
else
|
||||
{
|
||||
entity.FallbackLanguage = "en";
|
||||
}
|
||||
|
||||
rect.y += EditorGUIUtility.singleLineHeight * 1.25f;
|
||||
_rect = new Rect(rect.x, rect.y, 120, EditorGUIUtility.singleLineHeight);
|
||||
|
||||
entity.GetList().DoList(new Rect(rect.x, rect.y, rect.width, 20f));
|
||||
|
||||
if (EditorGUI.EndChangeCheck())
|
||||
{
|
||||
EditorUtility.SetDirty(_translatable);
|
||||
Undo.RegisterCreatedObjectUndo (_translatable, "Changed Translatable");
|
||||
}
|
||||
}
|
||||
|
||||
private float OnHeightElement(int index)
|
||||
{
|
||||
if (index > _translatable.Translatables.Count) return EditorGUIUtility.singleLineHeight * 1f;
|
||||
entity = _translatable.Translatables[index];
|
||||
|
||||
/*if (entity.Type == CVRTranslatable.TranslatableType.GameObject)
|
||||
{
|
||||
return (entity.Translations.Count == 0 ? 1 : entity.Translations.Count * 2f + 5.25f) * 1.25f * EditorGUIUtility.singleLineHeight;
|
||||
}*/
|
||||
|
||||
return ((entity.Translations.Count == 0 ? 1 : entity.Translations.Count *
|
||||
(entity.Type == CVRTranslatable.TranslatableType.AudioClip || entity.Type == CVRTranslatable.TranslatableType.GameObject?2f:4f)) + 5.25f ) * 1.25f *
|
||||
EditorGUIUtility.singleLineHeight;
|
||||
}
|
||||
|
||||
private void OnChanged(ReorderableList list)
|
||||
{
|
||||
EditorUtility.SetDirty(_translatable);
|
||||
}
|
||||
|
||||
private void OnAdd(ReorderableList list)
|
||||
{
|
||||
_translatable.Translatables.Add(new CVRTranslatable.ObjectTranslatable_t());
|
||||
Repaint();
|
||||
}
|
||||
|
||||
private void OnDrawHeader(Rect rect)
|
||||
{
|
||||
Rect _rect = new Rect(rect.x, rect.y, rect.width, EditorGUIUtility.singleLineHeight);
|
||||
|
||||
GUI.Label(_rect, "Translatables");
|
||||
}
|
||||
|
||||
public override void OnInspectorGUI()
|
||||
{
|
||||
if (_translatable == null) _translatable = (CVRTranslatable) target;
|
||||
|
||||
if (reorderableList == null) InitializeList();
|
||||
|
||||
reorderableList.DoLayoutList();
|
||||
}
|
||||
}
|
||||
}
|
3
Assets/ABI.CCK/Scripts/Editor/CCK_CVRTranslatableEditor.cs.meta
Executable file
3
Assets/ABI.CCK/Scripts/Editor/CCK_CVRTranslatableEditor.cs.meta
Executable file
|
@ -0,0 +1,3 @@
|
|||
fileFormatVersion: 2
|
||||
guid: d77d020521ad4e49bb2fe2208d6e5d0f
|
||||
timeCreated: 1623092626
|
529
Assets/ABI.CCK/Scripts/Editor/CCK_CVRWorldEditor.cs
Executable file
529
Assets/ABI.CCK/Scripts/Editor/CCK_CVRWorldEditor.cs
Executable file
|
@ -0,0 +1,529 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using ABI.CCK.Components;
|
||||
#if CCK_ADDIN_HIGHLIGHT_PLUS
|
||||
using HighlightPlus;
|
||||
#endif
|
||||
using UnityEditor;
|
||||
using UnityEditorInternal;
|
||||
using UnityEngine;
|
||||
|
||||
namespace ABI.CCK.Scripts.Editor
|
||||
{
|
||||
[CustomEditor(typeof(ABI.CCK.Components.CVRWorld)), CanEditMultipleObjects]
|
||||
public class CCK_CVRWorldEditor : UnityEditor.Editor
|
||||
{
|
||||
private CVRWorld _world;
|
||||
|
||||
private ReorderableList CategoryList = null;
|
||||
private CVRObjectCatalogCategory objectCatalogCategory = null;
|
||||
private List<string> popupListName = new List<string>();
|
||||
private List<string> popupListID = new List<string>();
|
||||
|
||||
private ReorderableList objectCatalogList = null;
|
||||
private CVRObjectCatalogEntry objectCatalogEntry = null;
|
||||
|
||||
public override void OnInspectorGUI()
|
||||
{
|
||||
if (_world == null) _world = (CVRWorld) target;
|
||||
|
||||
EditorGUILayout.LabelField("World settings");
|
||||
|
||||
var list = serializedObject.FindProperty("spawns");
|
||||
EditorGUILayout.PropertyField(list, new GUIContent("Spawns"), true);
|
||||
serializedObject.ApplyModifiedProperties();
|
||||
|
||||
_world.spawnRule = (CVRWorld.SpawnRule) EditorGUILayout.EnumPopup("Spawn Rule", _world.spawnRule);
|
||||
|
||||
_world.referenceCamera = (GameObject) EditorGUILayout.ObjectField("Reference Camera", _world.referenceCamera, typeof(GameObject), true);
|
||||
|
||||
_world.respawnHeightY = EditorGUILayout.IntField("Respawn Height Y", _world.respawnHeightY);
|
||||
|
||||
_world.objectRespawnBehaviour = (CVRWorld.RespawnBehaviour) EditorGUILayout.EnumPopup("Object Respawn Behaviour", _world.objectRespawnBehaviour);
|
||||
|
||||
EditorGUILayout.LabelField("Optional settings");
|
||||
|
||||
list = serializedObject.FindProperty("warpPoints");
|
||||
EditorGUILayout.PropertyField(list, new GUIContent("Warp Points"), true);
|
||||
serializedObject.ApplyModifiedProperties();
|
||||
|
||||
|
||||
GUILayout.BeginVertical("HelpBox");
|
||||
GUILayout.BeginHorizontal ();
|
||||
_world.useAdvancedSettings = EditorGUILayout.Toggle (_world.useAdvancedSettings, GUILayout.Width(16));
|
||||
EditorGUILayout.LabelField ("Use Advanced Settings", GUILayout.Width(250));
|
||||
GUILayout.EndHorizontal ();
|
||||
|
||||
if (_world.useAdvancedSettings)
|
||||
{
|
||||
GUILayout.BeginHorizontal ();
|
||||
GUILayout.BeginVertical ("GroupBox");
|
||||
|
||||
EditorGUILayout.LabelField("World Rules");
|
||||
|
||||
_world.allowSpawnables = EditorGUILayout.Toggle("Allow Spawnables", _world.allowSpawnables);
|
||||
|
||||
_world.allowPortals = EditorGUILayout.Toggle("Allow Portals", _world.allowPortals);
|
||||
|
||||
_world.allowFlying = EditorGUILayout.Toggle("Allow Flying", _world.allowFlying);
|
||||
|
||||
_world.showNamePlates = EditorGUILayout.Toggle("Show Nameplates", _world.showNamePlates);
|
||||
|
||||
_world.enableBuilder = EditorGUILayout.Toggle("Enable Builder", _world.enableBuilder);
|
||||
|
||||
EditorGUILayout.Space();
|
||||
|
||||
EditorGUILayout.LabelField("Movement Parameters");
|
||||
|
||||
EditorGUILayout.HelpBox("Changing these Values can lead to an undesirable experience.", MessageType.Warning);
|
||||
|
||||
EditorGUILayout.Space();
|
||||
|
||||
_world.baseMovementSpeed = EditorGUILayout.FloatField("Base Movement Speed", _world.baseMovementSpeed);
|
||||
|
||||
_world.sprintMultiplier = EditorGUILayout.FloatField("Sprint Multiplier", _world.sprintMultiplier);
|
||||
|
||||
_world.strafeMultiplier = EditorGUILayout.FloatField("Strafe Multiplier", _world.strafeMultiplier);
|
||||
|
||||
_world.crouchMultiplier = EditorGUILayout.FloatField("Crouch Multiplier", _world.crouchMultiplier);
|
||||
|
||||
_world.proneMultiplier = EditorGUILayout.FloatField("Prone Multiplier", _world.proneMultiplier);
|
||||
|
||||
_world.flyMultiplier = EditorGUILayout.FloatField("Fly Multiplier", _world.flyMultiplier);
|
||||
|
||||
_world.inAirMovementMultiplier = EditorGUILayout.FloatField("In Air Movement Multiplier", _world.inAirMovementMultiplier);
|
||||
|
||||
_world.gravity = EditorGUILayout.FloatField("Gravity", _world.gravity);
|
||||
|
||||
_world.jumpHeight = EditorGUILayout.FloatField("Jump Height", _world.jumpHeight);
|
||||
|
||||
_world.fov = EditorGUILayout.Slider("Fov", _world.fov, 60f, 120f);
|
||||
|
||||
_world.enableZoom = EditorGUILayout.Toggle("Enable Zoom", _world.enableZoom);
|
||||
|
||||
#if CCK_ADDIN_HIGHLIGHT_PLUS
|
||||
_world.highlightProfile = (HighlightProfile) EditorGUILayout.ObjectField("Highlighting Profile", _world.highlightProfile,
|
||||
typeof(HighlightProfile), true);
|
||||
#endif
|
||||
|
||||
GUILayout.EndVertical ();
|
||||
GUILayout.EndHorizontal ();
|
||||
}
|
||||
|
||||
GUILayout.EndVertical ();
|
||||
|
||||
GUILayout.BeginVertical("HelpBox");
|
||||
GUILayout.BeginHorizontal ();
|
||||
EditorGUILayout.LabelField ("Object Catalog");
|
||||
GUILayout.EndHorizontal ();
|
||||
GUILayout.BeginHorizontal ();
|
||||
GUILayout.BeginVertical ("GroupBox");
|
||||
|
||||
InitializeCategoryList();
|
||||
CategoryList.DoLayoutList();
|
||||
popupListName.Clear();
|
||||
popupListID.Clear();
|
||||
foreach (var category in _world.objectCatalogCategories)
|
||||
{
|
||||
if (string.IsNullOrEmpty(category.id)) category.id = "w~" + System.Guid.NewGuid().ToString();
|
||||
popupListName.Add(string.IsNullOrEmpty(category.name) ? "-" : category.name);
|
||||
popupListID.Add(category.id);
|
||||
}
|
||||
|
||||
EditorGUILayout.Space();
|
||||
|
||||
InitializeObjectCatalogList();
|
||||
objectCatalogList.DoLayoutList();
|
||||
|
||||
GUILayout.EndVertical ();
|
||||
GUILayout.EndHorizontal ();
|
||||
GUILayout.EndVertical ();
|
||||
}
|
||||
|
||||
private void InitializeCategoryList()
|
||||
{
|
||||
if (CategoryList != null) return;
|
||||
|
||||
CategoryList = new ReorderableList(_world.objectCatalogCategories, typeof(CVRObjectCatalogCategory),
|
||||
false, true, true, true);
|
||||
CategoryList.drawHeaderCallback = OnDrawHeaderCategory;
|
||||
CategoryList.drawElementCallback = OnDrawElementCategory;
|
||||
CategoryList.elementHeightCallback = OnHeightElementCategory;
|
||||
CategoryList.onChangedCallback = OnChangedCategory;
|
||||
}
|
||||
|
||||
private void OnDrawHeaderCategory(Rect rect)
|
||||
{
|
||||
Rect _rect = new Rect(rect.x, rect.y, rect.width, EditorGUIUtility.singleLineHeight);
|
||||
|
||||
GUI.Label(_rect, "Categories");
|
||||
}
|
||||
|
||||
private void OnDrawElementCategory(Rect rect, int index, bool isactive, bool isfocused)
|
||||
{
|
||||
if (index > _world.objectCatalogCategories.Count) return;
|
||||
objectCatalogCategory = _world.objectCatalogCategories[index];
|
||||
|
||||
Rect _rect = new Rect(rect.x + 50, rect.y, 50, EditorGUIUtility.singleLineHeight);
|
||||
Rect initialRect = rect;
|
||||
|
||||
EditorGUI.LabelField(_rect, "Name");
|
||||
_rect.x += 50;
|
||||
_rect.width = rect.width - 50 - 50;
|
||||
|
||||
objectCatalogCategory.name = EditorGUI.TextField(_rect, objectCatalogCategory.name);
|
||||
|
||||
rect.y += EditorGUIUtility.singleLineHeight * 1.25f;
|
||||
_rect = new Rect(rect.x + 50, rect.y, 50, EditorGUIUtility.singleLineHeight);
|
||||
|
||||
EditorGUI.LabelField(_rect, "Image");
|
||||
_rect.x += 50;
|
||||
_rect.width = rect.width - 50 - 50;
|
||||
|
||||
objectCatalogCategory.image = (Texture2D) EditorGUI.ObjectField(_rect, objectCatalogCategory.image, typeof(Texture2D));
|
||||
|
||||
if (objectCatalogCategory.image != null)
|
||||
{
|
||||
GUI.DrawTexture(new Rect(initialRect.x, initialRect.y, 42, 42), objectCatalogCategory.image);
|
||||
}
|
||||
}
|
||||
|
||||
private float OnHeightElementCategory(int index)
|
||||
{
|
||||
return EditorGUIUtility.singleLineHeight * 2.5f;
|
||||
}
|
||||
|
||||
private void OnChangedCategory(ReorderableList list)
|
||||
{
|
||||
EditorUtility.SetDirty(target);
|
||||
}
|
||||
|
||||
private void InitializeObjectCatalogList()
|
||||
{
|
||||
if (objectCatalogList != null) return;
|
||||
|
||||
objectCatalogList = new ReorderableList(_world.objectCatalogEntries, typeof(CVRObjectCatalogEntry),
|
||||
true, true, true, true);
|
||||
objectCatalogList.drawHeaderCallback = OnDrawHeaderEntry;
|
||||
objectCatalogList.drawElementCallback = OnDrawElementEntry;
|
||||
objectCatalogList.elementHeightCallback = OnHeightElementEntry;
|
||||
objectCatalogList.onChangedCallback = OnChangedEntry;
|
||||
}
|
||||
|
||||
private void OnDrawHeaderEntry(Rect rect)
|
||||
{
|
||||
Rect _rect = new Rect(rect.x, rect.y, rect.width, EditorGUIUtility.singleLineHeight);
|
||||
|
||||
GUI.Label(_rect, "Objects");
|
||||
}
|
||||
|
||||
private void OnDrawElementEntry(Rect rect, int index, bool isactive, bool isfocused)
|
||||
{
|
||||
if (index > _world.objectCatalogEntries.Count) return;
|
||||
objectCatalogEntry = _world.objectCatalogEntries[index];
|
||||
|
||||
while (objectCatalogEntry.guid == "")
|
||||
{
|
||||
var guid = "w~" + System.Guid.NewGuid().ToString();
|
||||
var guidValid = true;
|
||||
|
||||
foreach (var entry in _world.objectCatalogEntries)
|
||||
{
|
||||
if (entry.guid == guid) guidValid = false;
|
||||
}
|
||||
|
||||
if (!guidValid) continue;
|
||||
objectCatalogEntry.guid = guid;
|
||||
}
|
||||
|
||||
Rect _rect = new Rect(rect.x + 100, rect.y, 100, EditorGUIUtility.singleLineHeight);
|
||||
Rect initialRect = rect;
|
||||
|
||||
EditorGUI.LabelField(_rect, "Name");
|
||||
_rect.x += 60;
|
||||
_rect.width = rect.width - 160;
|
||||
|
||||
objectCatalogEntry.name = EditorGUI.TextField(_rect, objectCatalogEntry.name);
|
||||
|
||||
rect.y += EditorGUIUtility.singleLineHeight * 1.25f;
|
||||
_rect = new Rect(rect.x + 100, rect.y, 100, EditorGUIUtility.singleLineHeight);
|
||||
|
||||
EditorGUI.LabelField(_rect, "Prefab");
|
||||
_rect.x += 60;
|
||||
_rect.width = rect.width - 160;
|
||||
|
||||
objectCatalogEntry.prefab = (GameObject) EditorGUI.ObjectField(_rect, objectCatalogEntry.prefab, typeof(GameObject));
|
||||
|
||||
if (objectCatalogEntry.prefab != null)
|
||||
{
|
||||
var spawnable = objectCatalogEntry.prefab.GetComponent<CVRSpawnable>();
|
||||
var builder = objectCatalogEntry.prefab.GetComponent<CVRBuilderSpawnable>();
|
||||
|
||||
if (spawnable == null && builder == null) objectCatalogEntry.prefab = null;
|
||||
}
|
||||
|
||||
rect.y += EditorGUIUtility.singleLineHeight * 1.25f;
|
||||
_rect = new Rect(rect.x + 100, rect.y, 100, EditorGUIUtility.singleLineHeight);
|
||||
|
||||
EditorGUI.LabelField(_rect, "Category");
|
||||
_rect.x += 60;
|
||||
_rect.width = rect.width - 160;
|
||||
|
||||
var catIndex = popupListID.IndexOf(objectCatalogEntry.categoryId);
|
||||
catIndex = EditorGUI.Popup(_rect, catIndex, popupListName.ToArray());
|
||||
if (catIndex >= 0) objectCatalogEntry.categoryId = popupListID[catIndex];
|
||||
|
||||
rect.y += EditorGUIUtility.singleLineHeight * 1.25f;
|
||||
_rect = new Rect(rect.x + 100, rect.y, 100, EditorGUIUtility.singleLineHeight);
|
||||
|
||||
EditorGUI.LabelField(_rect, "Preview");
|
||||
_rect.x += 60;
|
||||
_rect.width = rect.width - 160;
|
||||
|
||||
objectCatalogEntry.preview = (Texture2D) EditorGUI.ObjectField(_rect, objectCatalogEntry.preview, typeof(Texture2D));
|
||||
|
||||
rect.y += EditorGUIUtility.singleLineHeight * 1.25f;
|
||||
_rect = new Rect(rect.x, rect.y, rect.width, EditorGUIUtility.singleLineHeight);
|
||||
|
||||
if (GUI.Button(_rect, "Generate Preview"))
|
||||
{
|
||||
GeneratePreviewImage(objectCatalogEntry);
|
||||
}
|
||||
|
||||
if (objectCatalogEntry.preview != null)
|
||||
{
|
||||
GUI.DrawTexture(new Rect(initialRect.x, initialRect.y, 88, 88), objectCatalogEntry.preview);
|
||||
}
|
||||
}
|
||||
|
||||
private void GeneratePreviewImage(CVRObjectCatalogEntry objectCatalogEntry)
|
||||
{
|
||||
if (objectCatalogEntry.prefab == null) return;
|
||||
|
||||
var path = "Assets/ABI.CCK/Resources/WorldObjectCatalog";
|
||||
var objectPosition = Vector3.down * 1000f;
|
||||
var rt = new RenderTexture(256, 256, 32);
|
||||
|
||||
if (!AssetDatabase.IsValidFolder(path))
|
||||
AssetDatabase.CreateFolder("Assets/ABI.CCK/Resources", "WorldObjectCatalog");
|
||||
|
||||
var obj = Instantiate(objectCatalogEntry.prefab, objectPosition, Quaternion.identity);
|
||||
|
||||
var renderers = obj.GetComponentsInChildren<Renderer>();
|
||||
Bounds b = new Bounds(Vector3.zero, Vector3.zero);
|
||||
|
||||
foreach (var renderer in renderers)
|
||||
{
|
||||
if (b.size.y == 0f)
|
||||
{
|
||||
b = renderer.bounds;
|
||||
}
|
||||
else
|
||||
{
|
||||
b.Encapsulate(renderer.bounds);
|
||||
}
|
||||
}
|
||||
|
||||
var transforms = obj.GetComponentsInChildren<Transform>();
|
||||
foreach (var transform in transforms)
|
||||
{
|
||||
transform.gameObject.layer = 12;
|
||||
}
|
||||
|
||||
var cam = new GameObject("Preview Capture", new[] {typeof(Camera), typeof(Light)}).GetComponent<Camera>();
|
||||
var light = cam.gameObject.GetComponent<Light>();
|
||||
light.type = LightType.Directional;
|
||||
light.cullingMask = 1 << 12;
|
||||
cam.aspect = 1f;
|
||||
cam.targetTexture = rt;
|
||||
cam.clearFlags = CameraClearFlags.Color;
|
||||
cam.backgroundColor = Color.black;
|
||||
cam.cullingMask = 1 << 12;
|
||||
|
||||
cam.transform.position = objectPosition + new Vector3(0f, b.extents.y, b.extents.y * 2f);
|
||||
cam.transform.eulerAngles = new Vector3(0f, 180f, 0f);
|
||||
Texture2D screenShot1 = new Texture2D(256, 256, TextureFormat.RGB24, false);
|
||||
cam.Render();
|
||||
RenderTexture.active = rt;
|
||||
screenShot1.ReadPixels(new Rect(0, 0, 256, 256), 0, 0);
|
||||
AssetDatabase.CreateAsset(screenShot1, path + "/ObjectCatalog_temp_1.asset");
|
||||
AssetDatabase.ImportAsset(path + "/ObjectCatalog_temp_1.asset", ImportAssetOptions.ForceUpdate);
|
||||
RenderTexture.active = null;
|
||||
|
||||
cam.transform.position = objectPosition + new Vector3(b.extents.y * 1.41f, b.extents.y, b.extents.y * 1.41f);
|
||||
cam.transform.eulerAngles = new Vector3(0f, 225f, 0f);
|
||||
Texture2D screenShot2 = new Texture2D(256, 256, TextureFormat.RGB24, false);
|
||||
cam.Render();
|
||||
RenderTexture.active = rt;
|
||||
screenShot2.ReadPixels(new Rect(0, 0, 256, 256), 0, 0);
|
||||
AssetDatabase.CreateAsset(screenShot2, path + "/ObjectCatalog_temp_2.asset");
|
||||
AssetDatabase.ImportAsset(path + "/ObjectCatalog_temp_2.asset", ImportAssetOptions.ForceUpdate);
|
||||
RenderTexture.active = null;
|
||||
|
||||
cam.transform.position = objectPosition + new Vector3(b.extents.y * 2f, b.extents.y, 0f);
|
||||
cam.transform.eulerAngles = new Vector3(0f, 270f, 0f);
|
||||
Texture2D screenShot3 = new Texture2D(256, 256, TextureFormat.RGB24, false);
|
||||
cam.Render();
|
||||
RenderTexture.active = rt;
|
||||
screenShot3.ReadPixels(new Rect(0, 0, 256, 256), 0, 0);
|
||||
AssetDatabase.CreateAsset(screenShot3, path + "/ObjectCatalog_temp_3.asset");
|
||||
AssetDatabase.ImportAsset(path + "/ObjectCatalog_temp_3.asset", ImportAssetOptions.ForceUpdate);
|
||||
RenderTexture.active = null;
|
||||
|
||||
cam.transform.position = objectPosition + new Vector3(b.extents.y * 1.41f, b.extents.y, b.extents.y * -1.41f);
|
||||
cam.transform.eulerAngles = new Vector3(0f, 315f, 0f);
|
||||
Texture2D screenShot4 = new Texture2D(256, 256, TextureFormat.RGB24, false);
|
||||
cam.Render();
|
||||
RenderTexture.active = rt;
|
||||
screenShot4.ReadPixels(new Rect(0, 0, 256, 256), 0, 0);
|
||||
AssetDatabase.CreateAsset(screenShot4, path + "/ObjectCatalog_temp_4.asset");
|
||||
AssetDatabase.ImportAsset(path + "/ObjectCatalog_temp_4.asset", ImportAssetOptions.ForceUpdate);
|
||||
RenderTexture.active = null;
|
||||
|
||||
cam.transform.position = objectPosition + new Vector3(0f, b.extents.y, b.extents.y * -2f);
|
||||
cam.transform.eulerAngles = new Vector3(0f, 0f, 0f);
|
||||
Texture2D screenShot5 = new Texture2D(256, 256, TextureFormat.RGB24, false);
|
||||
cam.Render();
|
||||
RenderTexture.active = rt;
|
||||
screenShot5.ReadPixels(new Rect(0, 0, 256, 256), 0, 0);
|
||||
AssetDatabase.CreateAsset(screenShot5, path + "/ObjectCatalog_temp_5.asset");
|
||||
AssetDatabase.ImportAsset(path + "/ObjectCatalog_temp_5.asset", ImportAssetOptions.ForceUpdate);
|
||||
RenderTexture.active = null;
|
||||
|
||||
cam.transform.position = objectPosition + new Vector3(b.extents.y * -1.41f, b.extents.y, b.extents.y * -1.41f);
|
||||
cam.transform.eulerAngles = new Vector3(0f, 45f, 0f);
|
||||
Texture2D screenShot6 = new Texture2D(256, 256, TextureFormat.RGB24, false);
|
||||
cam.Render();
|
||||
RenderTexture.active = rt;
|
||||
screenShot6.ReadPixels(new Rect(0, 0, 256, 256), 0, 0);
|
||||
AssetDatabase.CreateAsset(screenShot6, path + "/ObjectCatalog_temp_6.asset");
|
||||
AssetDatabase.ImportAsset(path + "/ObjectCatalog_temp_6.asset", ImportAssetOptions.ForceUpdate);
|
||||
RenderTexture.active = null;
|
||||
|
||||
cam.transform.position = objectPosition + new Vector3(b.extents.y * -2f, b.extents.y, 0f);
|
||||
cam.transform.eulerAngles = new Vector3(0f, 90f, 0f);
|
||||
Texture2D screenShot7 = new Texture2D(256, 256, TextureFormat.RGB24, false);
|
||||
cam.Render();
|
||||
RenderTexture.active = rt;
|
||||
screenShot7.ReadPixels(new Rect(0, 0, 256, 256), 0, 0);
|
||||
AssetDatabase.CreateAsset(screenShot7, path + "/ObjectCatalog_temp_7.asset");
|
||||
AssetDatabase.ImportAsset(path + "/ObjectCatalog_temp_7.asset", ImportAssetOptions.ForceUpdate);
|
||||
RenderTexture.active = null;
|
||||
|
||||
cam.transform.position = objectPosition + new Vector3(b.extents.y * -1.41f, b.extents.y, b.extents.y * 1.41f);
|
||||
cam.transform.eulerAngles = new Vector3(0f, 135f, 0f);
|
||||
Texture2D screenShot8 = new Texture2D(256, 256, TextureFormat.RGB24, false);
|
||||
cam.Render();
|
||||
RenderTexture.active = rt;
|
||||
screenShot8.ReadPixels(new Rect(0, 0, 256, 256), 0, 0);
|
||||
AssetDatabase.CreateAsset(screenShot8, path + "/ObjectCatalog_temp_8.asset");
|
||||
AssetDatabase.ImportAsset(path + "/ObjectCatalog_temp_8.asset", ImportAssetOptions.ForceUpdate);
|
||||
RenderTexture.active = null;
|
||||
|
||||
DestroyImmediate(obj);
|
||||
DestroyImmediate(cam.gameObject);
|
||||
|
||||
AssetDatabase.SaveAssets();
|
||||
AssetDatabase.Refresh();
|
||||
|
||||
WorldObjectCatalogPreviewSelector window = (WorldObjectCatalogPreviewSelector) EditorWindow.GetWindow (
|
||||
typeof(WorldObjectCatalogPreviewSelector),
|
||||
true,
|
||||
"Select Catalog Object Preview"
|
||||
);
|
||||
|
||||
window.objectCatalogEntry = objectCatalogEntry;
|
||||
window.previewOption1 = screenShot1;
|
||||
window.previewOption2 = screenShot2;
|
||||
window.previewOption3 = screenShot3;
|
||||
window.previewOption4 = screenShot4;
|
||||
window.previewOption5 = screenShot5;
|
||||
window.previewOption6 = screenShot6;
|
||||
window.previewOption7 = screenShot7;
|
||||
window.previewOption8 = screenShot8;
|
||||
|
||||
var scale = WorldObjectCatalogPreviewSelector.previewWindowScale;
|
||||
|
||||
window.minSize = new Vector2(1152 * scale, 576 * scale);
|
||||
window.maxSize = new Vector2(1152 * scale, 576 * scale);
|
||||
|
||||
window.Show();
|
||||
}
|
||||
|
||||
private float OnHeightElementEntry(int index)
|
||||
{
|
||||
return EditorGUIUtility.singleLineHeight * 6.25f;
|
||||
}
|
||||
|
||||
private void OnChangedEntry(ReorderableList list)
|
||||
{
|
||||
EditorUtility.SetDirty(target);
|
||||
}
|
||||
}
|
||||
|
||||
public class WorldObjectCatalogPreviewSelector : EditorWindow
|
||||
{
|
||||
public static float previewWindowScale = 0.75f;
|
||||
|
||||
public CVRObjectCatalogEntry objectCatalogEntry = null;
|
||||
public Texture2D previewOption1 = null;
|
||||
public Texture2D previewOption2 = null;
|
||||
public Texture2D previewOption3 = null;
|
||||
public Texture2D previewOption4 = null;
|
||||
public Texture2D previewOption5 = null;
|
||||
public Texture2D previewOption6 = null;
|
||||
public Texture2D previewOption7 = null;
|
||||
public Texture2D previewOption8 = null;
|
||||
|
||||
private string path = "Assets/ABI.CCK/Resources/WorldObjectCatalog";
|
||||
|
||||
private void OnGUI()
|
||||
{
|
||||
if (GUI.Button(new Rect(16 * previewWindowScale, 16 * previewWindowScale, 256 * previewWindowScale, 256 * previewWindowScale), previewOption1))
|
||||
{
|
||||
SelectPreviewImage(objectCatalogEntry, previewOption1);
|
||||
}
|
||||
if (GUI.Button(new Rect(304 * previewWindowScale, 16 * previewWindowScale, 256 * previewWindowScale, 256 * previewWindowScale), previewOption2))
|
||||
{
|
||||
SelectPreviewImage(objectCatalogEntry, previewOption2);
|
||||
}
|
||||
if (GUI.Button(new Rect(592 * previewWindowScale, 16 * previewWindowScale, 256 * previewWindowScale, 256 * previewWindowScale), previewOption3))
|
||||
{
|
||||
SelectPreviewImage(objectCatalogEntry, previewOption3);
|
||||
}
|
||||
if (GUI.Button(new Rect(880 * previewWindowScale, 16 * previewWindowScale, 256 * previewWindowScale, 256 * previewWindowScale), previewOption4))
|
||||
{
|
||||
SelectPreviewImage(objectCatalogEntry, previewOption4);
|
||||
}
|
||||
if (GUI.Button(new Rect(16 * previewWindowScale, 304 * previewWindowScale, 256 * previewWindowScale, 256 * previewWindowScale), previewOption5))
|
||||
{
|
||||
SelectPreviewImage(objectCatalogEntry, previewOption5);
|
||||
}
|
||||
if (GUI.Button(new Rect(304 * previewWindowScale, 304 * previewWindowScale, 256 * previewWindowScale, 256 * previewWindowScale), previewOption6))
|
||||
{
|
||||
SelectPreviewImage(objectCatalogEntry, previewOption6);
|
||||
}
|
||||
if (GUI.Button(new Rect(592 * previewWindowScale, 304 * previewWindowScale, 256 * previewWindowScale, 256 * previewWindowScale), previewOption7))
|
||||
{
|
||||
SelectPreviewImage(objectCatalogEntry, previewOption7);
|
||||
}
|
||||
if (GUI.Button(new Rect(880 * previewWindowScale, 304 * previewWindowScale, 256 * previewWindowScale, 256 * previewWindowScale), previewOption8))
|
||||
{
|
||||
SelectPreviewImage(objectCatalogEntry, previewOption8);
|
||||
}
|
||||
}
|
||||
|
||||
private void SelectPreviewImage(CVRObjectCatalogEntry objectCatalogEntry, Texture2D selected)
|
||||
{
|
||||
byte[] bytes = selected.EncodeToPNG();
|
||||
var filename = path + "/ObjectCatalog_" + objectCatalogEntry.name + "_" + objectCatalogEntry.guid + "_preview.png";
|
||||
System.IO.File.WriteAllBytes(filename, bytes);
|
||||
|
||||
AssetDatabase.SaveAssets();
|
||||
AssetDatabase.Refresh();
|
||||
|
||||
Texture2D createdTexture = AssetDatabase.LoadAssetAtPath<Texture2D>(filename);
|
||||
objectCatalogEntry.preview = createdTexture;
|
||||
}
|
||||
}
|
||||
}
|
3
Assets/ABI.CCK/Scripts/Editor/CCK_CVRWorldEditor.cs.meta
Executable file
3
Assets/ABI.CCK/Scripts/Editor/CCK_CVRWorldEditor.cs.meta
Executable file
|
@ -0,0 +1,3 @@
|
|||
fileFormatVersion: 2
|
||||
guid: ce0787065da84f58b3b090f2a6bac03c
|
||||
timeCreated: 1627582871
|
15
Assets/ABI.CCK/Scripts/Editor/CCK_CVR_ActionEditor.cs
Executable file
15
Assets/ABI.CCK/Scripts/Editor/CCK_CVR_ActionEditor.cs
Executable file
|
@ -0,0 +1,15 @@
|
|||
using UnityEditor;
|
||||
|
||||
namespace ABI.CCK.Scripts.Editor
|
||||
{
|
||||
[CustomEditor(typeof(ABI.CCK.Components.CVRAction))]
|
||||
public class CCK_CVR_ActionEditor : UnityEditor.Editor
|
||||
{
|
||||
public override void OnInspectorGUI()
|
||||
{
|
||||
EditorGUILayout.HelpBox("This component is not yet ready to use!", MessageType.Error);
|
||||
|
||||
base.DrawDefaultInspector();
|
||||
}
|
||||
}
|
||||
}
|
11
Assets/ABI.CCK/Scripts/Editor/CCK_CVR_ActionEditor.cs.meta
Executable file
11
Assets/ABI.CCK/Scripts/Editor/CCK_CVR_ActionEditor.cs.meta
Executable file
|
@ -0,0 +1,11 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 9ab23ae3c6944eceb5b57b10e793ccc6
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
15
Assets/ABI.CCK/Scripts/Editor/CCK_CVR_TimelineSyncEditor.cs
Executable file
15
Assets/ABI.CCK/Scripts/Editor/CCK_CVR_TimelineSyncEditor.cs
Executable file
|
@ -0,0 +1,15 @@
|
|||
using UnityEditor;
|
||||
|
||||
namespace ABI.CCK.Scripts.Editor
|
||||
{
|
||||
[CustomEditor(typeof(ABI.CCK.Components.CVRTimelineSync))]
|
||||
public class CCK_CVR_TimelineSyncEditor : UnityEditor.Editor
|
||||
{
|
||||
public override void OnInspectorGUI()
|
||||
{
|
||||
EditorGUILayout.HelpBox("This component is not yet ready to use!", MessageType.Error);
|
||||
|
||||
base.DrawDefaultInspector();
|
||||
}
|
||||
}
|
||||
}
|
11
Assets/ABI.CCK/Scripts/Editor/CCK_CVR_TimelineSyncEditor.cs.meta
Executable file
11
Assets/ABI.CCK/Scripts/Editor/CCK_CVR_TimelineSyncEditor.cs.meta
Executable file
|
@ -0,0 +1,11 @@
|
|||
fileFormatVersion: 2
|
||||
guid: e25b5a5d468e4e6084701674b84b6ad0
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
246
Assets/ABI.CCK/Scripts/Editor/CCK_CVR_VideoPlayerEditor.cs
Executable file
246
Assets/ABI.CCK/Scripts/Editor/CCK_CVR_VideoPlayerEditor.cs
Executable file
|
@ -0,0 +1,246 @@
|
|||
using ABI.CCK.Components;
|
||||
using UnityEditor;
|
||||
using UnityEditorInternal;
|
||||
using UnityEngine;
|
||||
|
||||
|
||||
[CustomEditor(typeof(CVRVideoPlayer))]
|
||||
public class CCK_CVR_VideoPlayerEditor : Editor
|
||||
{
|
||||
private ReorderableList _reorderableList;
|
||||
private CVRVideoPlayer _player;
|
||||
private static bool _showGeneral = true;
|
||||
private static bool _showAudio = true;
|
||||
private static bool _showPlaylists = true;
|
||||
private static bool _showEvents = true;
|
||||
|
||||
private const string TypeLabel = "Playlists";
|
||||
|
||||
private void OnEnable()
|
||||
{
|
||||
if (_player == null) _player = (CVRVideoPlayer)target;
|
||||
|
||||
_reorderableList = new ReorderableList(_player.entities, typeof(CVRVideoPlayerPlaylist), true, true, true, true);
|
||||
_reorderableList.drawHeaderCallback = OnDrawHeader;
|
||||
_reorderableList.drawElementCallback = OnDrawElement;
|
||||
_reorderableList.elementHeightCallback = OnHeightElement;
|
||||
_reorderableList.onAddCallback = OnAdd;
|
||||
_reorderableList.onChangedCallback = OnChanged;
|
||||
}
|
||||
|
||||
private float OnHeightElement(int index)
|
||||
{
|
||||
var height = 0f;
|
||||
|
||||
if (!_player.entities[index].isCollapsed) return EditorGUIUtility.singleLineHeight * 1.25f;
|
||||
|
||||
height += EditorGUIUtility.singleLineHeight * (3f + 2.5f);
|
||||
|
||||
if (_player.entities[index].playlistVideos.Count == 0) height += 1.25f * EditorGUIUtility.singleLineHeight;
|
||||
|
||||
foreach (var entry in _player.entities[index].playlistVideos)
|
||||
{
|
||||
if (entry == null)
|
||||
{
|
||||
height += 1.25f * EditorGUIUtility.singleLineHeight;
|
||||
}
|
||||
else
|
||||
{
|
||||
height += (entry.isCollapsed ? 7.5f : 1.25f) * EditorGUIUtility.singleLineHeight;
|
||||
}
|
||||
}
|
||||
|
||||
return height;
|
||||
}
|
||||
|
||||
private void OnDrawHeader(Rect rect)
|
||||
{
|
||||
Rect rectA = new Rect(rect.x, rect.y, rect.width, EditorGUIUtility.singleLineHeight);
|
||||
|
||||
GUI.Label(rectA, TypeLabel);
|
||||
}
|
||||
|
||||
private void OnDrawElement(Rect rect, int index, bool isActive, bool isFocused)
|
||||
{
|
||||
if (index > _player.entities.Count) return;
|
||||
|
||||
rect.y += 2;
|
||||
rect.x += 12;
|
||||
rect.width -= 12;
|
||||
Rect rectA = new Rect(rect.x, rect.y, 100, EditorGUIUtility.singleLineHeight);
|
||||
|
||||
EditorGUI.BeginChangeCheck();
|
||||
|
||||
bool collapse = EditorGUI.Foldout(rectA, _player.entities[index].isCollapsed, "Playlist Title", true);
|
||||
|
||||
if (EditorGUI.EndChangeCheck())
|
||||
{
|
||||
Undo.RecordObject(target, "Playlist Expand");
|
||||
_player.entities[index].isCollapsed = collapse;
|
||||
}
|
||||
|
||||
rectA.x += 80;
|
||||
rectA.width = rect.width - 80;
|
||||
|
||||
EditorGUI.BeginChangeCheck();
|
||||
|
||||
string playlistTitle = EditorGUI.TextField(rectA, _player.entities[index].playlistTitle);
|
||||
|
||||
if (EditorGUI.EndChangeCheck())
|
||||
{
|
||||
Undo.RecordObject(target, "Playlist Title");
|
||||
_player.entities[index].playlistTitle = playlistTitle;
|
||||
}
|
||||
|
||||
if (!_player.entities[index].isCollapsed) return;
|
||||
|
||||
rect.y += EditorGUIUtility.singleLineHeight * 1.25f;
|
||||
rectA = new Rect(rect.x, rect.y, 100, EditorGUIUtility.singleLineHeight);
|
||||
|
||||
EditorGUI.LabelField(rectA, "Thumbnail Url");
|
||||
rectA.x += 80;
|
||||
rectA.width = rect.width - 80;
|
||||
|
||||
EditorGUI.BeginChangeCheck();
|
||||
|
||||
string playlistThumbnailUrl = EditorGUI.TextField(rectA, _player.entities[index].playlistThumbnailUrl);
|
||||
|
||||
if (EditorGUI.EndChangeCheck())
|
||||
{
|
||||
Undo.RecordObject(target, "Playlist Thumbnail Url");
|
||||
_player.entities[index].playlistThumbnailUrl = playlistThumbnailUrl;
|
||||
}
|
||||
|
||||
rect.y += EditorGUIUtility.singleLineHeight * 1.25f;
|
||||
//_rect = new Rect(rect.x, rect.y, 100, EditorGUIUtility.singleLineHeight);
|
||||
|
||||
var videoList = _player.entities[index].GetReorderableList(_player);
|
||||
videoList.DoList(new Rect(rect.x, rect.y, rect.width, 20f));
|
||||
}
|
||||
|
||||
private void OnAdd(ReorderableList list)
|
||||
{
|
||||
Undo.RecordObject(target, "Add Playlist Entry");
|
||||
_player.entities.Add(null);
|
||||
}
|
||||
|
||||
private void OnChanged(ReorderableList list)
|
||||
{
|
||||
Undo.RecordObject(target, "Playlist List changed");
|
||||
}
|
||||
|
||||
public override void OnInspectorGUI()
|
||||
{
|
||||
#region General settings
|
||||
|
||||
_showGeneral = EditorGUILayout.BeginFoldoutHeaderGroup(_showGeneral, "General");
|
||||
if (_showGeneral)
|
||||
{
|
||||
_player.syncEnabled = EditorGUILayout.Toggle("Network Sync", _player.syncEnabled);
|
||||
_player.autoplay = EditorGUILayout.Toggle("Play On Awake", _player.autoplay);
|
||||
_player.interactiveUI = EditorGUILayout.Toggle("Use Interactive Library UI", _player.interactiveUI);
|
||||
_player.videoPlayerUIPosition = (Transform)EditorGUILayout.ObjectField("UI Position/Parent", _player.videoPlayerUIPosition, typeof(Transform), true);
|
||||
_player.localPlaybackSpeed = EditorGUILayout.Slider("Playback Speed", _player.localPlaybackSpeed, 0.5f, 2.0f);
|
||||
|
||||
EditorGUILayout.Space();
|
||||
EditorGUILayout.Space();
|
||||
|
||||
_player.ProjectionTexture = (RenderTexture)EditorGUILayout.ObjectField("Projection Texture", _player.ProjectionTexture, typeof(RenderTexture), true);
|
||||
EditorGUILayout.Space();
|
||||
|
||||
if (_player.ProjectionTexture == null)
|
||||
{
|
||||
EditorGUILayout.HelpBox("The video player output texture is empty, please fill it or no video will be drawn.", MessageType.Warning);
|
||||
if (GUILayout.Button("Create Sample Render Texture"))
|
||||
{
|
||||
RenderTexture tex = new RenderTexture(1920, 1080, 24);
|
||||
if (!AssetDatabase.IsValidFolder("Assets/ABI.Generated"))
|
||||
AssetDatabase.CreateFolder("Assets", "ABI.Generated");
|
||||
if (!AssetDatabase.IsValidFolder("Assets/ABI.Generated/VideoPlayer"))
|
||||
AssetDatabase.CreateFolder("Assets/ABI.Generated", "VideoPlayer");
|
||||
if (!AssetDatabase.IsValidFolder("Assets/ABI.Generated/VideoPlayer/RenderTextures"))
|
||||
AssetDatabase.CreateFolder("Assets/ABI.Generated/VideoPlayer", "RenderTextures");
|
||||
AssetDatabase.CreateAsset(tex,
|
||||
"Assets/ABI.Generated/VideoPlayer/RenderTextures/" + _player.gameObject.GetInstanceID() +
|
||||
".renderTexture");
|
||||
_player.ProjectionTexture = tex;
|
||||
}
|
||||
}
|
||||
|
||||
EditorGUILayout.Space();
|
||||
}
|
||||
|
||||
EditorGUILayout.EndFoldoutHeaderGroup();
|
||||
|
||||
#endregion
|
||||
|
||||
#region Audio settings
|
||||
|
||||
_showAudio = EditorGUILayout.BeginFoldoutHeaderGroup(_showAudio, "Audio");
|
||||
|
||||
if (_showAudio)
|
||||
{
|
||||
_player.playbackVolume = EditorGUILayout.Slider("Playback Volume", _player.playbackVolume, 0.0f, 1.0f);
|
||||
_player.audioPlaybackMode = (CVRVideoPlayer.AudioMode)EditorGUILayout.EnumPopup("Audio Playback Mode ", _player.audioPlaybackMode);
|
||||
_player.customAudioSource = (AudioSource)EditorGUILayout.ObjectField("Custom Audio Source", _player.customAudioSource, typeof(AudioSource), true);
|
||||
|
||||
var list = serializedObject.FindProperty("roomScaleAudioSources");
|
||||
EditorGUILayout.PropertyField(list, new GUIContent("Room Scale Audio Sources"), true);
|
||||
serializedObject.ApplyModifiedProperties();
|
||||
|
||||
EditorGUILayout.Space();
|
||||
}
|
||||
|
||||
EditorGUILayout.EndFoldoutHeaderGroup();
|
||||
|
||||
#endregion
|
||||
|
||||
#region Playlists
|
||||
|
||||
_showPlaylists = EditorGUILayout.BeginFoldoutHeaderGroup(_showPlaylists, "Playlists");
|
||||
|
||||
if (_showPlaylists)
|
||||
{
|
||||
EditorGUILayout.LabelField(new GUIContent("Play On Awake Object", "Default video to play on start/awake"), new GUIContent(_player.playOnAwakeObject?.videoTitle));
|
||||
if (GUILayout.Button("Remove Play on Awake Object")) _player.playOnAwakeObject = null;
|
||||
|
||||
EditorGUILayout.Space();
|
||||
EditorGUILayout.Space();
|
||||
|
||||
_reorderableList.DoLayoutList();
|
||||
EditorGUILayout.Space();
|
||||
}
|
||||
|
||||
EditorGUILayout.EndFoldoutHeaderGroup();
|
||||
|
||||
#endregion
|
||||
|
||||
#region Events
|
||||
|
||||
_showEvents = EditorGUILayout.BeginFoldoutHeaderGroup(_showEvents, "Events");
|
||||
|
||||
if (_showEvents)
|
||||
{
|
||||
serializedObject.Update();
|
||||
EditorGUILayout.PropertyField(serializedObject.FindProperty("startedPlayback"), true);
|
||||
serializedObject.ApplyModifiedProperties();
|
||||
|
||||
serializedObject.Update();
|
||||
EditorGUILayout.PropertyField(serializedObject.FindProperty("finishedPlayback"), true);
|
||||
serializedObject.ApplyModifiedProperties();
|
||||
|
||||
serializedObject.Update();
|
||||
EditorGUILayout.PropertyField(serializedObject.FindProperty("pausedPlayback"), true);
|
||||
serializedObject.ApplyModifiedProperties();
|
||||
|
||||
serializedObject.Update();
|
||||
EditorGUILayout.PropertyField(serializedObject.FindProperty("setUrl"), true);
|
||||
serializedObject.ApplyModifiedProperties();
|
||||
EditorGUILayout.Space();
|
||||
}
|
||||
|
||||
EditorGUILayout.EndFoldoutHeaderGroup();
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
11
Assets/ABI.CCK/Scripts/Editor/CCK_CVR_VideoPlayerEditor.cs.meta
Executable file
11
Assets/ABI.CCK/Scripts/Editor/CCK_CVR_VideoPlayerEditor.cs.meta
Executable file
|
@ -0,0 +1,11 @@
|
|||
fileFormatVersion: 2
|
||||
guid: c6949d9993bf43cba4726fcbdbda90bb
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
615
Assets/ABI.CCK/Scripts/Editor/CCK_FaceTrackingUtilities.cs
Executable file
615
Assets/ABI.CCK/Scripts/Editor/CCK_FaceTrackingUtilities.cs
Executable file
|
@ -0,0 +1,615 @@
|
|||
using System.Collections.Generic;
|
||||
using ABI.CCK.Components;
|
||||
using UnityEditor;
|
||||
using UnityEngine;
|
||||
|
||||
namespace ABI.CCK.Scripts.Editor
|
||||
{
|
||||
public class CCK_FaceTrackingUtilities : EditorWindow
|
||||
{
|
||||
public CVRAvatar Avatar;
|
||||
public CVRFaceTracking FaceTracking;
|
||||
public int Tab = 0;
|
||||
|
||||
private int[] _blendShapeIndexes = new int[37];
|
||||
|
||||
private bool _enablePreview = false;
|
||||
private Vector3 _jawPosition = new Vector4(0f, 0f, 0f);
|
||||
private float _apeShape = 0f;
|
||||
private float _mouthUpper = 0f;
|
||||
private float _mouthLower = 0f;
|
||||
private float _mouthPout = 0f;
|
||||
private float _mouthSmileLeft = 0f;
|
||||
private float _mouthSmileRight = 0f;
|
||||
private float _mouthSadLeft = 0f;
|
||||
private float _mouthSadRight = 0f;
|
||||
private float _mouthPuffLeft = 0f;
|
||||
private float _mouthPuffRight = 0f;
|
||||
private float _mouthSuck = 0f;
|
||||
|
||||
private List<string> _blendShapes = new List<string>();
|
||||
|
||||
private bool _enableJawGeneration = false;
|
||||
private int _jawBlendShapeIndex = -1;
|
||||
private float _jawMovementStrength = 0.05f;
|
||||
|
||||
private bool _enableLipGeneration = false;
|
||||
private int _lipBlendShapeIndex = -1;
|
||||
private float _lipMovementStrength = 0.05f;
|
||||
|
||||
private bool _enableSmileGeneration = false;
|
||||
private int _smileBlendShapeIndex = -1;
|
||||
|
||||
private bool _enableFrownGeneration = false;
|
||||
private int _frownBlendShapeIndex = -1;
|
||||
|
||||
private bool _enablePuffGeneration = false;
|
||||
private int _puffBlendShapeIndex = -1;
|
||||
|
||||
[MenuItem("Alpha Blend Interactive/Modules/Face Tracking Utilities")]
|
||||
private static void Init()
|
||||
{
|
||||
CCK_FaceTrackingUtilities window = (CCK_FaceTrackingUtilities)GetWindow(typeof(CCK_FaceTrackingUtilities), false, $"CCK :: Face Tracking Utilities");
|
||||
window.Show();
|
||||
}
|
||||
|
||||
private void OnGUI()
|
||||
{
|
||||
var avatar = (CVRAvatar) EditorGUILayout.ObjectField("Avatar", Avatar, typeof(CVRAvatar));
|
||||
|
||||
if (avatar != Avatar) FaceTracking = null;
|
||||
Avatar = avatar;
|
||||
|
||||
if (Avatar == null) return;
|
||||
|
||||
if (Avatar != null && FaceTracking == null) FaceTracking = Avatar.GetComponentInChildren<CVRFaceTracking>();
|
||||
|
||||
if (FaceTracking == null)
|
||||
{
|
||||
EditorGUILayout.HelpBox("No Face Tracking component detected on Avatar. Would you like to add one?", MessageType.Info);
|
||||
|
||||
if (GUILayout.Button("Add Face Tracking"))
|
||||
{
|
||||
if (Avatar.bodyMesh == null)
|
||||
{
|
||||
EditorUtility.DisplayDialog("Error", "Your Selected Avatar has no Face Mesh selected.", "OK");
|
||||
return;
|
||||
}
|
||||
|
||||
FaceTracking = Avatar.gameObject.AddComponent<CVRFaceTracking>();
|
||||
FaceTracking.FaceMesh = Avatar.bodyMesh;
|
||||
FaceTracking.GetBlendShapeNames();
|
||||
FaceTracking.FindVisemes();
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
Tab = GUILayout.Toolbar (Tab, new string[] {"Preview", "Blendshape Generator"});
|
||||
|
||||
switch (Tab)
|
||||
{
|
||||
case 0:
|
||||
ShowPreviewTab();
|
||||
break;
|
||||
case 1:
|
||||
ShowSetupTab();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
private void ShowPreviewTab()
|
||||
{
|
||||
_enablePreview = EditorGUILayout.Toggle("Enable Preview", _enablePreview);
|
||||
|
||||
FaceTracking.BlendShapeStrength = EditorGUILayout.Slider("Blend Shape Weight", FaceTracking.BlendShapeStrength, 50f, 500f);
|
||||
|
||||
EditorGUILayout.Space();
|
||||
|
||||
_jawPosition.x = EditorGUILayout.Slider("Jaw Position Forward", _jawPosition.x, 0f, 1f);
|
||||
_jawPosition.y = EditorGUILayout.Slider("Jaw Position Open", _jawPosition.y, 0f, 1f);
|
||||
_jawPosition.z = EditorGUILayout.Slider("Jaw Position Left Right", _jawPosition.z, -1f, 1f);
|
||||
|
||||
EditorGUILayout.Space();
|
||||
|
||||
_apeShape = EditorGUILayout.Slider("Mouth Ape Shape", _apeShape, 0f, 1f);
|
||||
|
||||
EditorGUILayout.Space();
|
||||
|
||||
_mouthUpper = EditorGUILayout.Slider("Mouth Upper", _mouthUpper, -1f, 1f);
|
||||
_mouthLower = EditorGUILayout.Slider("Mouth Lower", _mouthLower, -1f, 1f);
|
||||
|
||||
EditorGUILayout.Space();
|
||||
|
||||
_mouthPout = EditorGUILayout.Slider("Mouth Pout", _mouthPout, 0f, 1f);
|
||||
|
||||
EditorGUILayout.Space();
|
||||
|
||||
_mouthSmileLeft = EditorGUILayout.Slider("Mouth Smile Left", _mouthSmileLeft, 0f, 1f);
|
||||
_mouthSmileRight = EditorGUILayout.Slider("Mouth Smile Right", _mouthSmileRight, 0f, 1f);
|
||||
|
||||
EditorGUILayout.Space();
|
||||
|
||||
_mouthSadLeft = EditorGUILayout.Slider("Mouth Sad Left", _mouthSadLeft, 0f, 1f);
|
||||
_mouthSadRight = EditorGUILayout.Slider("Mouth Sad Right", _mouthSadRight, 0f, 1f);
|
||||
|
||||
EditorGUILayout.Space();
|
||||
|
||||
_mouthPuffLeft = EditorGUILayout.Slider("Cheek Puff Left", _mouthPuffLeft, 0f, 1f);
|
||||
_mouthPuffRight = EditorGUILayout.Slider("Cheek Puff Right", _mouthPuffRight, 0f, 1f);
|
||||
|
||||
EditorGUILayout.Space();
|
||||
|
||||
_mouthSuck = EditorGUILayout.Slider("Cheek Suck", _mouthSuck, 0f, 1f);
|
||||
|
||||
if (FaceTracking != null && FaceTracking.FaceMesh != null)
|
||||
{
|
||||
var m = FaceTracking.FaceMesh.sharedMesh;
|
||||
if (m != null)
|
||||
{
|
||||
for (var i = 0; i < m.blendShapeCount; i++)
|
||||
{
|
||||
string s = m.GetBlendShapeName(i);
|
||||
for (var j = 0; j < FaceTracking.FaceBlendShapes.Length; j++)
|
||||
{
|
||||
if (s == FaceTracking.FaceBlendShapes[j])
|
||||
{
|
||||
_blendShapeIndexes[j] = i;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (FaceTracking != null && FaceTracking.FaceMesh != null && _enablePreview)
|
||||
{
|
||||
var factor = FaceTracking.enableOverdriveBlendShapes ? 0.2f : 1f;
|
||||
|
||||
if (FaceTracking.FaceBlendShapes[2] != "-none-" && _blendShapeIndexes[2] <= FaceTracking.FaceMesh.sharedMesh.blendShapeCount)
|
||||
FaceTracking.FaceMesh.SetBlendShapeWeight(_blendShapeIndexes[2],
|
||||
Mathf.Clamp(_jawPosition.x, 0f, 1f) * FaceTracking.BlendShapeStrength * factor);
|
||||
|
||||
if (FaceTracking.FaceBlendShapes[3] != "-none-" && _blendShapeIndexes[3] <= FaceTracking.FaceMesh.sharedMesh.blendShapeCount)
|
||||
FaceTracking.FaceMesh.SetBlendShapeWeight(_blendShapeIndexes[3],
|
||||
Mathf.Clamp(_jawPosition.y, 0f, 1f) * FaceTracking.BlendShapeStrength * factor);
|
||||
|
||||
|
||||
if (FaceTracking.FaceBlendShapes[0] != "-none-" && _blendShapeIndexes[0] <= FaceTracking.FaceMesh.sharedMesh.blendShapeCount)
|
||||
FaceTracking.FaceMesh.SetBlendShapeWeight(_blendShapeIndexes[0],
|
||||
Mathf.Clamp(_jawPosition.z, 0f, 1f) * FaceTracking.BlendShapeStrength * factor);
|
||||
|
||||
if (FaceTracking.FaceBlendShapes[1] != "-none-" && _blendShapeIndexes[1] <= FaceTracking.FaceMesh.sharedMesh.blendShapeCount)
|
||||
FaceTracking.FaceMesh.SetBlendShapeWeight(_blendShapeIndexes[1],
|
||||
Mathf.Clamp(_jawPosition.z, -1f, 0f) * -1f * FaceTracking.BlendShapeStrength * factor);
|
||||
|
||||
if (FaceTracking.FaceBlendShapes[4] != "-none-" && _blendShapeIndexes[4] <= FaceTracking.FaceMesh.sharedMesh.blendShapeCount)
|
||||
FaceTracking.FaceMesh.SetBlendShapeWeight(_blendShapeIndexes[4],
|
||||
_apeShape * FaceTracking.BlendShapeStrength * factor);
|
||||
|
||||
if (FaceTracking.FaceBlendShapes[5] != "-none-" && _blendShapeIndexes[5] <= FaceTracking.FaceMesh.sharedMesh.blendShapeCount)
|
||||
FaceTracking.FaceMesh.SetBlendShapeWeight(_blendShapeIndexes[5],
|
||||
Mathf.Clamp(_mouthUpper, 0f, 1f) * FaceTracking.BlendShapeStrength * factor);
|
||||
|
||||
if (FaceTracking.FaceBlendShapes[6] != "-none-" && _blendShapeIndexes[6] <= FaceTracking.FaceMesh.sharedMesh.blendShapeCount)
|
||||
FaceTracking.FaceMesh.SetBlendShapeWeight(_blendShapeIndexes[6],
|
||||
Mathf.Clamp(_mouthUpper, -1f, 0f) * -1f * FaceTracking.BlendShapeStrength * factor);
|
||||
|
||||
if (FaceTracking.FaceBlendShapes[7] != "-none-" && _blendShapeIndexes[7] <= FaceTracking.FaceMesh.sharedMesh.blendShapeCount)
|
||||
FaceTracking.FaceMesh.SetBlendShapeWeight(_blendShapeIndexes[7],
|
||||
Mathf.Clamp(_mouthLower, 0f, 1f) * FaceTracking.BlendShapeStrength * factor);
|
||||
|
||||
if (FaceTracking.FaceBlendShapes[8] != "-none-" && _blendShapeIndexes[8] <= FaceTracking.FaceMesh.sharedMesh.blendShapeCount)
|
||||
FaceTracking.FaceMesh.SetBlendShapeWeight(_blendShapeIndexes[8],
|
||||
Mathf.Clamp(_mouthLower, -1f, 0f) * -1f * FaceTracking.BlendShapeStrength * factor);
|
||||
|
||||
if (FaceTracking.FaceBlendShapes[11] != "-none-" && _blendShapeIndexes[11] <= FaceTracking.FaceMesh.sharedMesh.blendShapeCount)
|
||||
FaceTracking.FaceMesh.SetBlendShapeWeight(_blendShapeIndexes[11],
|
||||
Mathf.Clamp(_mouthPout, 0f, 1f) * FaceTracking.BlendShapeStrength * factor);
|
||||
|
||||
if (FaceTracking.FaceBlendShapes[12] != "-none-" && _blendShapeIndexes[12] <= FaceTracking.FaceMesh.sharedMesh.blendShapeCount)
|
||||
FaceTracking.FaceMesh.SetBlendShapeWeight(_blendShapeIndexes[12],
|
||||
Mathf.Clamp(_mouthSmileRight, 0f, 1f) * FaceTracking.BlendShapeStrength * factor);
|
||||
|
||||
if (FaceTracking.FaceBlendShapes[13] != "-none-" && _blendShapeIndexes[13] <= FaceTracking.FaceMesh.sharedMesh.blendShapeCount)
|
||||
FaceTracking.FaceMesh.SetBlendShapeWeight(_blendShapeIndexes[13],
|
||||
Mathf.Clamp(_mouthSmileLeft, 0f, 1f) * FaceTracking.BlendShapeStrength * factor);
|
||||
|
||||
if (FaceTracking.FaceBlendShapes[14] != "-none-" && _blendShapeIndexes[14] <= FaceTracking.FaceMesh.sharedMesh.blendShapeCount)
|
||||
FaceTracking.FaceMesh.SetBlendShapeWeight(_blendShapeIndexes[14],
|
||||
Mathf.Clamp(_mouthSadRight, 0f, 1f) * FaceTracking.BlendShapeStrength * factor);
|
||||
|
||||
if (FaceTracking.FaceBlendShapes[15] != "-none-" && _blendShapeIndexes[15] <= FaceTracking.FaceMesh.sharedMesh.blendShapeCount)
|
||||
FaceTracking.FaceMesh.SetBlendShapeWeight(_blendShapeIndexes[15],
|
||||
Mathf.Clamp(_mouthSadLeft, 0f, 1f) * FaceTracking.BlendShapeStrength * factor);
|
||||
|
||||
if (FaceTracking.FaceBlendShapes[16] != "-none-" && _blendShapeIndexes[16] <= FaceTracking.FaceMesh.sharedMesh.blendShapeCount)
|
||||
FaceTracking.FaceMesh.SetBlendShapeWeight(_blendShapeIndexes[16],
|
||||
Mathf.Clamp(_mouthPuffRight, 0f, 1f) * FaceTracking.BlendShapeStrength * factor);
|
||||
|
||||
if (FaceTracking.FaceBlendShapes[17] != "-none-" && _blendShapeIndexes[17] <= FaceTracking.FaceMesh.sharedMesh.blendShapeCount)
|
||||
FaceTracking.FaceMesh.SetBlendShapeWeight(_blendShapeIndexes[17],
|
||||
Mathf.Clamp(_mouthPuffLeft, 0f, 1f) * FaceTracking.BlendShapeStrength * factor);
|
||||
|
||||
if (FaceTracking.FaceBlendShapes[18] != "-none-" && _blendShapeIndexes[18] <= FaceTracking.FaceMesh.sharedMesh.blendShapeCount)
|
||||
FaceTracking.FaceMesh.SetBlendShapeWeight(_blendShapeIndexes[18],
|
||||
Mathf.Clamp(_mouthSuck, 0f, 1f) * FaceTracking.BlendShapeStrength * factor);
|
||||
}
|
||||
else if (FaceTracking != null)
|
||||
{
|
||||
for (var j = 0; j < FaceTracking.FaceBlendShapes.Length; j++)
|
||||
{
|
||||
if (FaceTracking.FaceBlendShapes[j] != "-none-")
|
||||
{
|
||||
FaceTracking.FaceMesh.SetBlendShapeWeight(_blendShapeIndexes[j], 0f);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void ShowSetupTab()
|
||||
{
|
||||
if (FaceTracking != null && FaceTracking.FaceMesh != null)
|
||||
{
|
||||
var m = FaceTracking.FaceMesh.sharedMesh;
|
||||
if (m != null)
|
||||
{
|
||||
_blendShapes.Clear();
|
||||
_blendShapes.Add("-none-");
|
||||
for (var i = 0; i < m.blendShapeCount; i++)
|
||||
{
|
||||
_blendShapes.Add(m.GetBlendShapeName(i));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
EditorGUILayout.HelpBox("The Generator uses your Avatars Voice Position to generate new Blendhapes. Please make sure it is in the middle of the mouth between the lips.", MessageType.Warning);
|
||||
|
||||
_enableJawGeneration = EditorGUILayout.Toggle("Generate Jaw Blendshapes", _enableJawGeneration);
|
||||
|
||||
if (_enableJawGeneration)
|
||||
{
|
||||
EditorGUILayout.HelpBox("You should use a Blendshape here that opens the mouth ond moves the jaw down. For example the AA Viseme.", MessageType.Info);
|
||||
_jawBlendShapeIndex = EditorGUILayout.Popup("Jaw Open Blendshape", _jawBlendShapeIndex + 1, _blendShapes.ToArray()) - 1;
|
||||
_jawMovementStrength = EditorGUILayout.FloatField("Jaw Movement Strength", _jawMovementStrength);
|
||||
EditorGUILayout.Space();
|
||||
}
|
||||
|
||||
_enableLipGeneration = EditorGUILayout.Toggle("Generate Lip Blendshapes", _enableLipGeneration);
|
||||
|
||||
if (_enableLipGeneration)
|
||||
{
|
||||
EditorGUILayout.HelpBox("You should use a Blendshape here that moves only the Lips and a little bit of the surrounding face", MessageType.Info);
|
||||
_lipBlendShapeIndex = EditorGUILayout.Popup("Lips Blendshape", _lipBlendShapeIndex + 1, _blendShapes.ToArray()) - 1;
|
||||
_lipMovementStrength = EditorGUILayout.FloatField("Lip Movement Strength", _lipMovementStrength);
|
||||
EditorGUILayout.Space();
|
||||
}
|
||||
|
||||
_enableSmileGeneration = EditorGUILayout.Toggle("Separate Smile Blendshape", _enableSmileGeneration);
|
||||
|
||||
if (_enableSmileGeneration)
|
||||
{
|
||||
EditorGUILayout.HelpBox("You should place a Blendshape that contains a smile expression. The Generator will separate the sides", MessageType.Info);
|
||||
_smileBlendShapeIndex = EditorGUILayout.Popup("Smile Blendshape", _smileBlendShapeIndex + 1, _blendShapes.ToArray()) - 1;
|
||||
EditorGUILayout.Space();
|
||||
}
|
||||
|
||||
_enableFrownGeneration = EditorGUILayout.Toggle("Separate Frown Blendshape", _enableFrownGeneration);
|
||||
|
||||
if (_enableFrownGeneration)
|
||||
{
|
||||
EditorGUILayout.HelpBox("You should place a Blendshape that contains a frown expression. The Generator will separate the sides", MessageType.Info);
|
||||
_frownBlendShapeIndex = EditorGUILayout.Popup("Frown Blendshape", _frownBlendShapeIndex + 1, _blendShapes.ToArray()) - 1;
|
||||
EditorGUILayout.Space();
|
||||
}
|
||||
|
||||
_enablePuffGeneration = EditorGUILayout.Toggle("Separate Puff Blendshape", _enablePuffGeneration);
|
||||
|
||||
if (_enablePuffGeneration)
|
||||
{
|
||||
EditorGUILayout.HelpBox("You should place a Blendshape here that Puffs both cheeks. The Generator will separate the sides", MessageType.Info);
|
||||
_puffBlendShapeIndex = EditorGUILayout.Popup("Puff Cheek Blendshape", _puffBlendShapeIndex + 1, _blendShapes.ToArray()) - 1;
|
||||
EditorGUILayout.Space();
|
||||
}
|
||||
|
||||
|
||||
if (GUILayout.Button("Generate Blendshapes"))
|
||||
{
|
||||
GenerateBlendShapes();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
private void GenerateBlendShapes()
|
||||
{
|
||||
if (FaceTracking.OriginalMesh == null)
|
||||
{
|
||||
FaceTracking.OriginalMesh = FaceTracking.FaceMesh.sharedMesh;
|
||||
}
|
||||
|
||||
var mesh = FaceTracking.OriginalMesh;
|
||||
|
||||
//Mesh Creation
|
||||
Mesh m = mesh.Copy();
|
||||
|
||||
string pathToCurrentFolder = "Assets/FaceTracking.Generated";
|
||||
if (!AssetDatabase.IsValidFolder(pathToCurrentFolder)) AssetDatabase.CreateFolder("Assets", "FaceTracking.Generated");
|
||||
|
||||
var meshPath = pathToCurrentFolder + "/" + Avatar.transform.name + ".mesh";
|
||||
|
||||
AssetDatabase.CreateAsset(m, meshPath);
|
||||
|
||||
var worldPosition = Vector3.zero;
|
||||
|
||||
var minX = 0f;
|
||||
var maxX = 0f;
|
||||
var minY = 0f;
|
||||
var maxY = 0f;
|
||||
var minZ = 0f;
|
||||
var maxZ = 0f;
|
||||
|
||||
var leftWeight = 0f;
|
||||
var rightWeight = 0f;
|
||||
var upWeight = 0f;
|
||||
var downWeight = 0f;
|
||||
|
||||
Transform faceMeshTransform = FaceTracking.FaceMesh.transform;
|
||||
Matrix4x4 localToWorld = faceMeshTransform.localToWorldMatrix;
|
||||
Matrix4x4 worldToLocal = faceMeshTransform.worldToLocalMatrix;
|
||||
|
||||
//Jaw Blendshapes
|
||||
if (_enableJawGeneration && _jawBlendShapeIndex != -1)
|
||||
{
|
||||
Vector3[] deltaVerticesLeft = new Vector3[m.vertexCount];
|
||||
Vector3[] deltaVerticesRight = new Vector3[m.vertexCount];
|
||||
Vector3[] deltaVerticesOpen = new Vector3[m.vertexCount];
|
||||
Vector3[] deltaVerticesForward = new Vector3[m.vertexCount];
|
||||
Vector3[] deltaNormals = new Vector3[m.vertexCount];
|
||||
Vector3[] deltaTangents = new Vector3[m.vertexCount];
|
||||
m.GetBlendShapeFrameVertices(_jawBlendShapeIndex, 0, deltaVerticesLeft, deltaNormals, deltaTangents);
|
||||
m.GetBlendShapeFrameVertices(_jawBlendShapeIndex, 0, deltaVerticesRight, deltaNormals, deltaTangents);
|
||||
m.GetBlendShapeFrameVertices(_jawBlendShapeIndex, 0, deltaVerticesOpen, deltaNormals, deltaTangents);
|
||||
m.GetBlendShapeFrameVertices(_jawBlendShapeIndex, 0, deltaVerticesForward, deltaNormals, deltaTangents);
|
||||
|
||||
for (int i = 0; i < m.vertexCount; i++)
|
||||
{
|
||||
if (deltaVerticesLeft[i] == Vector3.zero) continue;
|
||||
|
||||
worldPosition = GetPointRelativeToAvatarVoicePosition(localToWorld, m.vertices[i]);
|
||||
if (worldPosition.y > maxY) maxY = worldPosition.y;
|
||||
if (worldPosition.y < minY) minY = worldPosition.y;
|
||||
}
|
||||
|
||||
for (int i = 0; i < m.vertexCount; i++)
|
||||
{
|
||||
if (deltaVerticesLeft[i] == Vector3.zero) continue;
|
||||
|
||||
worldPosition = GetPointRelativeToAvatarVoicePosition(localToWorld, m.vertices[i]);
|
||||
upWeight = Mathf.Clamp01(Mathf.InverseLerp(minY / 4f, 0, worldPosition.y));
|
||||
downWeight = 1f - upWeight;
|
||||
|
||||
deltaVerticesForward[i] = (deltaVerticesForward[i] + localToWorld.MultiplyPoint3x4(Vector3.forward) * _jawMovementStrength * 0.00001f) * downWeight;
|
||||
deltaVerticesForward[i].Scale(faceMeshTransform.InverseTransformDirection(Vector3.forward));
|
||||
deltaVerticesLeft[i] = (deltaVerticesLeft[i] + localToWorld.MultiplyPoint3x4(Vector3.left) * _jawMovementStrength * 0.00001f) * downWeight;
|
||||
deltaVerticesLeft[i].Scale(faceMeshTransform.InverseTransformDirection(Vector3.right));
|
||||
deltaVerticesRight[i] = (deltaVerticesRight[i] + localToWorld.MultiplyPoint3x4(Vector3.right) * _jawMovementStrength * 0.00001f) * downWeight;
|
||||
deltaVerticesRight[i].Scale(faceMeshTransform.InverseTransformDirection(Vector3.right));
|
||||
}
|
||||
|
||||
m.AddBlendShapeFrame("Jaw_Right_generated", 100f, deltaVerticesRight, null, null);
|
||||
m.AddBlendShapeFrame("Jaw_Left_generated", 100f, deltaVerticesLeft, null, null);
|
||||
m.AddBlendShapeFrame("Jaw_Forward_generated", 100f, deltaVerticesForward, null, null);
|
||||
m.AddBlendShapeFrame("Jaw_Open_generated", 100f, deltaVerticesOpen, null, null);
|
||||
}
|
||||
|
||||
//Lip Blendshapes
|
||||
if (_enableLipGeneration && _lipBlendShapeIndex != -1)
|
||||
{
|
||||
Vector3[] deltaVerticesUpLeft = new Vector3[m.vertexCount];
|
||||
Vector3[] deltaVerticesUpRight = new Vector3[m.vertexCount];
|
||||
Vector3[] deltaVerticesDownLeft = new Vector3[m.vertexCount];
|
||||
Vector3[] deltaVerticesDownRight = new Vector3[m.vertexCount];
|
||||
Vector3[] deltaNormals = new Vector3[m.vertexCount];
|
||||
Vector3[] deltaTangents = new Vector3[m.vertexCount];
|
||||
m.GetBlendShapeFrameVertices(_lipBlendShapeIndex, 0, deltaVerticesUpLeft, deltaNormals, deltaTangents);
|
||||
m.GetBlendShapeFrameVertices(_lipBlendShapeIndex, 0, deltaVerticesUpRight, deltaNormals, deltaTangents);
|
||||
m.GetBlendShapeFrameVertices(_lipBlendShapeIndex, 0, deltaVerticesDownLeft, deltaNormals, deltaTangents);
|
||||
m.GetBlendShapeFrameVertices(_lipBlendShapeIndex, 0, deltaVerticesDownRight, deltaNormals, deltaTangents);
|
||||
|
||||
for (int i = 0; i < m.vertexCount; i++)
|
||||
{
|
||||
if (deltaVerticesUpLeft[i] == Vector3.zero) continue;
|
||||
|
||||
worldPosition = GetPointRelativeToAvatarVoicePosition(localToWorld, m.vertices[i]);
|
||||
if (worldPosition.x > maxX) maxX = worldPosition.x;
|
||||
if (worldPosition.x < minX) minX = worldPosition.x;
|
||||
if (worldPosition.y > maxY) maxY = worldPosition.y;
|
||||
if (worldPosition.y < minY) minY = worldPosition.y;
|
||||
}
|
||||
|
||||
for (int i = 0; i < m.vertexCount; i++)
|
||||
{
|
||||
if (deltaVerticesUpLeft[i] == Vector3.zero) continue;
|
||||
|
||||
worldPosition = GetPointRelativeToAvatarVoicePosition(localToWorld, m.vertices[i]);
|
||||
upWeight = Mathf.Clamp01(Mathf.InverseLerp(0, 0.0001f, worldPosition.y));
|
||||
downWeight = 1f - upWeight;
|
||||
rightWeight = Mathf.Clamp01(Mathf.InverseLerp(minX / 4f, maxX / 4f, worldPosition.x));
|
||||
leftWeight = 1f - rightWeight;
|
||||
|
||||
deltaVerticesUpLeft[i] = (localToWorld.MultiplyPoint3x4(Vector3.left) * _lipMovementStrength * 0.00001f) * upWeight;
|
||||
deltaVerticesUpRight[i] = (localToWorld.MultiplyPoint3x4(Vector3.right) * _lipMovementStrength * 0.00001f) * upWeight;
|
||||
deltaVerticesDownLeft[i] = (localToWorld.MultiplyPoint3x4(Vector3.left) * _lipMovementStrength * 0.00001f) * downWeight;
|
||||
deltaVerticesDownRight[i] = (localToWorld.MultiplyPoint3x4(Vector3.right) * _lipMovementStrength * 0.00001f) * downWeight;
|
||||
}
|
||||
|
||||
m.AddBlendShapeFrame("Mouth_Upper_Right_generated", 100f, deltaVerticesUpRight, null, null);
|
||||
m.AddBlendShapeFrame("Mouth_Upper_Left_generated", 100f, deltaVerticesUpLeft, null, null);
|
||||
m.AddBlendShapeFrame("Mouth_Lower_Right_generated", 100f, deltaVerticesDownRight, null, null);
|
||||
m.AddBlendShapeFrame("Mouth_Lower_Left_generated", 100f, deltaVerticesDownLeft, null, null);
|
||||
}
|
||||
|
||||
//Smile Blendshapes
|
||||
if (_enableSmileGeneration && _smileBlendShapeIndex != -1)
|
||||
{
|
||||
Vector3[] deltaVerticesLeft = new Vector3[m.vertexCount];
|
||||
Vector3[] deltaVerticesRight = new Vector3[m.vertexCount];
|
||||
Vector3[] deltaNormals = new Vector3[m.vertexCount];
|
||||
Vector3[] deltaTangents = new Vector3[m.vertexCount];
|
||||
m.GetBlendShapeFrameVertices(_smileBlendShapeIndex, 0, deltaVerticesLeft, deltaNormals, deltaTangents);
|
||||
m.GetBlendShapeFrameVertices(_smileBlendShapeIndex, 0, deltaVerticesRight, deltaNormals, deltaTangents);
|
||||
|
||||
for (int i = 0; i < m.vertexCount; i++)
|
||||
{
|
||||
if (deltaVerticesLeft[i] == Vector3.zero) continue;
|
||||
|
||||
worldPosition = GetPointRelativeToAvatarVoicePosition(localToWorld, m.vertices[i]);
|
||||
if (worldPosition.x > maxX) maxX = worldPosition.x;
|
||||
if (worldPosition.x < minX) minX = worldPosition.x;
|
||||
}
|
||||
|
||||
for (int i = 0; i < m.vertexCount; i++)
|
||||
{
|
||||
worldPosition = GetPointRelativeToAvatarVoicePosition(localToWorld, m.vertices[i]);
|
||||
rightWeight = Mathf.Clamp01(Mathf.InverseLerp(minX / 4f, maxX / 4f, worldPosition.x));
|
||||
leftWeight = 1f - rightWeight;
|
||||
|
||||
deltaVerticesLeft[i] = deltaVerticesLeft[i] * leftWeight;
|
||||
deltaVerticesRight[i] = deltaVerticesRight[i] * rightWeight;
|
||||
}
|
||||
|
||||
m.AddBlendShapeFrame("Mouth_Smile_Left_generated", 100f, deltaVerticesLeft, null, null);
|
||||
m.AddBlendShapeFrame("Mouth_Smile_Right_generated", 100f, deltaVerticesRight, null, null);
|
||||
}
|
||||
|
||||
//Frown Blendshapes
|
||||
if (_enableFrownGeneration && _frownBlendShapeIndex != -1)
|
||||
{
|
||||
Vector3[] deltaVerticesLeft = new Vector3[m.vertexCount];
|
||||
Vector3[] deltaVerticesRight = new Vector3[m.vertexCount];
|
||||
Vector3[] deltaNormals = new Vector3[m.vertexCount];
|
||||
Vector3[] deltaTangents = new Vector3[m.vertexCount];
|
||||
m.GetBlendShapeFrameVertices(_frownBlendShapeIndex, 0, deltaVerticesLeft, deltaNormals, deltaTangents);
|
||||
m.GetBlendShapeFrameVertices(_frownBlendShapeIndex, 0, deltaVerticesRight, deltaNormals, deltaTangents);
|
||||
|
||||
for (int i = 0; i < m.vertexCount; i++)
|
||||
{
|
||||
if (deltaVerticesLeft[i] == Vector3.zero) continue;
|
||||
|
||||
worldPosition = GetPointRelativeToAvatarVoicePosition(localToWorld, m.vertices[i]);
|
||||
if (worldPosition.x > maxX) maxX = worldPosition.x;
|
||||
if (worldPosition.x < minX) minX = worldPosition.x;
|
||||
}
|
||||
|
||||
for (int i = 0; i < m.vertexCount; i++)
|
||||
{
|
||||
worldPosition = GetPointRelativeToAvatarVoicePosition(localToWorld, m.vertices[i]);
|
||||
rightWeight = Mathf.Clamp01(Mathf.InverseLerp(minX / 4f, maxX / 4f, worldPosition.x));
|
||||
leftWeight = 1f - rightWeight;
|
||||
|
||||
deltaVerticesLeft[i] = deltaVerticesLeft[i] * leftWeight;
|
||||
deltaVerticesRight[i] = deltaVerticesRight[i] * rightWeight;
|
||||
}
|
||||
|
||||
m.AddBlendShapeFrame("Mouth_Sad_Left_generated", 100f, deltaVerticesLeft, null, null);
|
||||
m.AddBlendShapeFrame("Mouth_Sad_Right_generated", 100f, deltaVerticesRight, null, null);
|
||||
}
|
||||
|
||||
//Puff Blendshapes
|
||||
if (_enablePuffGeneration && _puffBlendShapeIndex != -1)
|
||||
{
|
||||
Vector3[] deltaVerticesLeft = new Vector3[m.vertexCount];
|
||||
Vector3[] deltaVerticesRight = new Vector3[m.vertexCount];
|
||||
Vector3[] deltaNormals = new Vector3[m.vertexCount];
|
||||
Vector3[] deltaTangents = new Vector3[m.vertexCount];
|
||||
m.GetBlendShapeFrameVertices(_puffBlendShapeIndex, 0, deltaVerticesLeft, deltaNormals, deltaTangents);
|
||||
m.GetBlendShapeFrameVertices(_puffBlendShapeIndex, 0, deltaVerticesRight, deltaNormals, deltaTangents);
|
||||
|
||||
for (int i = 0; i < m.vertexCount; i++)
|
||||
{
|
||||
if (deltaVerticesLeft[i] == Vector3.zero) continue;
|
||||
|
||||
worldPosition = GetPointRelativeToAvatarVoicePosition(localToWorld, m.vertices[i]);
|
||||
if (worldPosition.x > maxX) maxX = worldPosition.x;
|
||||
if (worldPosition.x < minX) minX = worldPosition.x;
|
||||
}
|
||||
|
||||
for (int i = 0; i < m.vertexCount; i++)
|
||||
{
|
||||
worldPosition = GetPointRelativeToAvatarVoicePosition(localToWorld, m.vertices[i]);
|
||||
rightWeight = Mathf.Clamp01(Mathf.InverseLerp(minX / 4f, maxX / 4f, worldPosition.x));
|
||||
leftWeight = 1f - rightWeight;
|
||||
|
||||
deltaVerticesLeft[i] = deltaVerticesLeft[i] * leftWeight;
|
||||
deltaVerticesRight[i] = deltaVerticesRight[i] * rightWeight;
|
||||
}
|
||||
|
||||
m.AddBlendShapeFrame("Cheek_Puff_Left_generated", 100f, deltaVerticesLeft, null, null);
|
||||
m.AddBlendShapeFrame("Cheek_Puff_Right_generated", 100f, deltaVerticesRight, null, null);
|
||||
}
|
||||
|
||||
m.RecalculateNormals();
|
||||
|
||||
AssetDatabase.SaveAssets();
|
||||
|
||||
FaceTracking.FaceMesh.sharedMesh = m;
|
||||
FaceTracking.GetBlendShapeNames();
|
||||
FaceTracking.FindVisemes();
|
||||
}
|
||||
|
||||
private Vector3 GetPointRelativeToAvatarVoicePosition(Matrix4x4 matrix, Vector3 VertexPosition)
|
||||
{
|
||||
VertexPosition.Scale(Avatar.transform.localScale);
|
||||
return matrix.MultiplyPoint3x4(VertexPosition) - Avatar.transform.TransformPoint(Avatar.voicePosition);
|
||||
}
|
||||
}
|
||||
|
||||
public static class MeshExtensions
|
||||
{
|
||||
public static Mesh Copy(this Mesh MeshHolder)
|
||||
{
|
||||
var newMesh = new Mesh();
|
||||
|
||||
newMesh = new Mesh();
|
||||
newMesh.vertices = MeshHolder.vertices;
|
||||
newMesh.normals = MeshHolder.normals;
|
||||
newMesh.uv = MeshHolder.uv;
|
||||
newMesh.uv2 = MeshHolder.uv2;
|
||||
newMesh.uv3 = MeshHolder.uv3;
|
||||
newMesh.uv4 = MeshHolder.uv4;
|
||||
newMesh.uv5 = MeshHolder.uv5;
|
||||
newMesh.uv6 = MeshHolder.uv6;
|
||||
newMesh.uv7 = MeshHolder.uv7;
|
||||
newMesh.uv8 = MeshHolder.uv8;
|
||||
newMesh.colors = MeshHolder.colors;
|
||||
newMesh.tangents = MeshHolder.tangents;
|
||||
newMesh.triangles = MeshHolder.triangles;
|
||||
newMesh.bindposes = MeshHolder.bindposes;
|
||||
newMesh.boneWeights = MeshHolder.boneWeights;
|
||||
newMesh.bounds = MeshHolder.bounds;
|
||||
for (int shape = 0; shape < MeshHolder.blendShapeCount; shape++)
|
||||
{
|
||||
int frameCount = MeshHolder.GetBlendShapeFrameCount(shape);
|
||||
for (int frame = 0; frame < frameCount; frame++)
|
||||
{
|
||||
string shapeName = MeshHolder.GetBlendShapeName(shape);
|
||||
float frameWeight = MeshHolder.GetBlendShapeFrameWeight(shape, frame);
|
||||
|
||||
Vector3[] dVertices = new Vector3[MeshHolder.vertexCount];
|
||||
Vector3[] dNormals = new Vector3[MeshHolder.vertexCount];
|
||||
Vector3[] dTangents = new Vector3[MeshHolder.vertexCount];
|
||||
MeshHolder.GetBlendShapeFrameVertices(shape, frame, dVertices, dNormals, dTangents);
|
||||
newMesh.AddBlendShapeFrame(shapeName, frameWeight, dVertices, dNormals, dTangents);
|
||||
}
|
||||
}
|
||||
|
||||
newMesh.subMeshCount = MeshHolder.subMeshCount;
|
||||
|
||||
for (int submesh = 0; submesh < MeshHolder.subMeshCount; submesh++)
|
||||
{
|
||||
newMesh.SetSubMesh(submesh, MeshHolder.GetSubMesh(submesh));
|
||||
}
|
||||
|
||||
return newMesh;
|
||||
}
|
||||
}
|
||||
}
|
3
Assets/ABI.CCK/Scripts/Editor/CCK_FaceTrackingUtilities.cs.meta
Executable file
3
Assets/ABI.CCK/Scripts/Editor/CCK_FaceTrackingUtilities.cs.meta
Executable file
|
@ -0,0 +1,3 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 3ad0f636a0bf4c44b038bb0a5c5e69a0
|
||||
timeCreated: 1622593306
|
94
Assets/ABI.CCK/Scripts/Editor/CCK_Init.cs
Executable file
94
Assets/ABI.CCK/Scripts/Editor/CCK_Init.cs
Executable file
|
@ -0,0 +1,94 @@
|
|||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEditor;
|
||||
using UnityEngine;
|
||||
|
||||
#pragma warning disable
|
||||
|
||||
[InitializeOnLoad]
|
||||
public class CCK_Init
|
||||
{
|
||||
static CCK_Init()
|
||||
{
|
||||
|
||||
void SetTag(SerializedProperty tags, string name, int index)
|
||||
{
|
||||
SerializedProperty sp = tags.GetArrayElementAtIndex(index);
|
||||
if (sp != null) sp.stringValue = name;
|
||||
}
|
||||
|
||||
void SetLayer(SerializedProperty layers, string name, int index)
|
||||
{
|
||||
SerializedProperty sp = layers.GetArrayElementAtIndex(index);
|
||||
if (sp != null) sp.stringValue = name;
|
||||
}
|
||||
|
||||
string cckSymbol = "CVR_CCK_EXISTS";
|
||||
string defines = PlayerSettings.GetScriptingDefineSymbolsForGroup(EditorUserBuildSettings.selectedBuildTargetGroup);
|
||||
if (!defines.Contains(cckSymbol))
|
||||
{
|
||||
PlayerSettings.SetScriptingDefineSymbolsForGroup(EditorUserBuildSettings.selectedBuildTargetGroup, (defines + ";" + cckSymbol));
|
||||
Debug.Log("[CCK:Init] Added CVR_CCK_EXISTS Scripting Symbol.");
|
||||
}
|
||||
|
||||
if (LayerMask.LayerToName(10) != "PlayerNetwork" || LayerMask.LayerToName(15) != "CVRReserved4" || LayerMask.LayerToName(17) != "CVRPickup")
|
||||
{
|
||||
Debug.Log("[CCK:Init] TagManager asset has to be recreated. Now recreating.");
|
||||
|
||||
SerializedObject tagManager = new SerializedObject(AssetDatabase.LoadAllAssetsAtPath("ProjectSettings/TagManager.asset")[0]);
|
||||
|
||||
SerializedProperty tagProperty = tagManager.FindProperty("tags");
|
||||
|
||||
var tagList = new (int, string)[]
|
||||
{
|
||||
(0, "CCKEditorUI_Uploader"),
|
||||
(1, "CCKSerializable"),
|
||||
(2, "CCKLambda"),
|
||||
(3, "CCKNetwork_System"),
|
||||
(4, "CCKNetwork_Routine"),
|
||||
(5, "ThisIsGarbage")
|
||||
};
|
||||
|
||||
foreach (var tag in tagList) SetTag(tagProperty, tag.Item2, tag.Item1);
|
||||
|
||||
SerializedProperty layerProperty = tagManager.FindProperty("layers");
|
||||
|
||||
var layerList = new (int, string)[]
|
||||
{
|
||||
(8, "PlayerLocal"),
|
||||
(9, "PlayerClone"),
|
||||
(10, "PlayerNetwork"),
|
||||
(11, "MirrorReflection"),
|
||||
(12, "CVRReserved1"),
|
||||
(13, "CVRReserved2"),
|
||||
(14, "CVRReserved3"),
|
||||
(15, "CVRReserved4"),
|
||||
(16, "PostProcessing"),
|
||||
(17, "CVRPickup"),
|
||||
(18, "CVRInteractable")
|
||||
};
|
||||
|
||||
foreach (var layer in layerList) SetLayer(layerProperty, layer.Item2, layer.Item1);
|
||||
|
||||
tagManager.ApplyModifiedProperties();
|
||||
}
|
||||
|
||||
if (!PlayerSettings.virtualRealitySupported)
|
||||
{
|
||||
Debug.Log("[CCK:Init] XR and render settings have to be changed. Now changing.");
|
||||
EditorUserBuildSettings.SwitchActiveBuildTarget(BuildTargetGroup.Standalone, BuildTarget.StandaloneWindows64);
|
||||
PlayerSettings.colorSpace = UnityEngine.ColorSpace.Linear;
|
||||
|
||||
PlayerSettings.apiCompatibilityLevel = ApiCompatibilityLevel.NET_4_6;
|
||||
|
||||
PlayerSettings.virtualRealitySupported = true;
|
||||
PlayerSettings.SetVirtualRealitySDKs(BuildTargetGroup.Standalone, new string[] { "None", "Oculus", "OpenVR", "MockHMD" });
|
||||
PlayerSettings.stereoRenderingPath = StereoRenderingPath.SinglePass;
|
||||
}
|
||||
|
||||
if (LayerMask.LayerToName(10) == "PlayerNetwork" && LayerMask.LayerToName(17) == "CVRPickup" && LayerMask.LayerToName(15) == "CVRReserved4" && PlayerSettings.virtualRealitySupported )
|
||||
{
|
||||
Debug.Log("[CCK:Init] Verified TagManager and ProjectSettings. No need to readjust.");
|
||||
}
|
||||
}
|
||||
}
|
11
Assets/ABI.CCK/Scripts/Editor/CCK_Init.cs.meta
Executable file
11
Assets/ABI.CCK/Scripts/Editor/CCK_Init.cs.meta
Executable file
|
@ -0,0 +1,11 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 81db3bbe621f01443ab7a3b446f9d851
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
18
Assets/ABI.CCK/Scripts/Editor/CCK_ObjectSyncEditor.cs
Executable file
18
Assets/ABI.CCK/Scripts/Editor/CCK_ObjectSyncEditor.cs
Executable file
|
@ -0,0 +1,18 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using ABI.CCK.Components;
|
||||
using UnityEditor;
|
||||
using UnityEditorInternal;
|
||||
using UnityEngine;
|
||||
|
||||
[CustomEditor(typeof(ABI.CCK.Components.CVRObjectSync))]
|
||||
public class CCK_ObjectSyncEditor : UnityEditor.Editor
|
||||
{
|
||||
public override void OnInspectorGUI()
|
||||
{
|
||||
EditorGUILayout.HelpBox("This component will have this objects position and rotation synced over network.", MessageType.Info);
|
||||
|
||||
//EditorGUILayout.Space();
|
||||
}
|
||||
|
||||
}
|
11
Assets/ABI.CCK/Scripts/Editor/CCK_ObjectSyncEditor.cs.meta
Executable file
11
Assets/ABI.CCK/Scripts/Editor/CCK_ObjectSyncEditor.cs.meta
Executable file
|
@ -0,0 +1,11 @@
|
|||
fileFormatVersion: 2
|
||||
guid: bf75b10b883c030499eef7b95f7f8674
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
93
Assets/ABI.CCK/Scripts/Editor/CCK_Tools.cs
Executable file
93
Assets/ABI.CCK/Scripts/Editor/CCK_Tools.cs
Executable file
|
@ -0,0 +1,93 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Net.Http;
|
||||
using System.Xml.Linq;
|
||||
using System.Xml.XPath;
|
||||
using ABI.CCK.Components;
|
||||
using UnityEditor;
|
||||
using UnityEditor.Animations;
|
||||
using UnityEditor.SceneManagement;
|
||||
using UnityEngine;
|
||||
using UnityEngine.Networking;
|
||||
using UnityEngine.SceneManagement;
|
||||
|
||||
namespace ABI.CCK.Scripts.Editor
|
||||
{
|
||||
public class CCK_Tools
|
||||
{
|
||||
|
||||
public enum SearchType
|
||||
{
|
||||
Scene = 1,
|
||||
Selection = 2
|
||||
}
|
||||
|
||||
public static int CleanMissingScripts (SearchType searchType, bool remove, GameObject givenObject)
|
||||
{
|
||||
List<GameObject> allFoundObjects = new List<GameObject>();
|
||||
GameObject[] rootObjects;
|
||||
|
||||
if (searchType == SearchType.Scene)
|
||||
{
|
||||
rootObjects = UnityEngine.SceneManagement.SceneManager.GetActiveScene().GetRootGameObjects();
|
||||
}
|
||||
else
|
||||
{
|
||||
rootObjects = new GameObject[1];
|
||||
rootObjects[0] = givenObject;
|
||||
}
|
||||
|
||||
foreach (var item in rootObjects)
|
||||
{
|
||||
allFoundObjects.AddRange(item.GetComponentsInChildren<Transform>(true).Select(go => go.gameObject).ToArray());
|
||||
}
|
||||
|
||||
int scriptCount = 0;
|
||||
int goCount = 0;
|
||||
foreach (var go in allFoundObjects)
|
||||
{
|
||||
int count = GameObjectUtility.GetMonoBehavioursWithMissingScriptCount(go);
|
||||
if (count > 0)
|
||||
{
|
||||
if (remove)
|
||||
{
|
||||
Undo.RegisterCompleteObjectUndo(go, "Remove missing scripts");
|
||||
GameObjectUtility.RemoveMonoBehavioursWithMissingScript(go);
|
||||
}
|
||||
scriptCount += count;
|
||||
goCount++;
|
||||
}
|
||||
}
|
||||
|
||||
if (remove)
|
||||
{
|
||||
EditorSceneManager.MarkSceneDirty(EditorSceneManager.GetActiveScene());
|
||||
EditorSceneManager.SaveScene(EditorSceneManager.GetActiveScene());
|
||||
}
|
||||
|
||||
if (remove) Debug.Log($"[CCK:Tools] Found and removed {scriptCount} missing scripts from {goCount} GameObjects");
|
||||
|
||||
return scriptCount;
|
||||
}
|
||||
|
||||
[MenuItem("Assets/Create/CVR Override Controller")]
|
||||
private static void CreateCVROverrideController()
|
||||
{
|
||||
var path = AssetDatabase.GetAssetPath(Selection.activeObject) + "/New Override Controller.overrideController";
|
||||
string[] guids = AssetDatabase.FindAssets("AvatarAnimator t:animatorController", null);
|
||||
|
||||
if (guids.Length < 1)
|
||||
{
|
||||
Debug.LogError("No Animator controller with the name \"AvatarAnimator\" was found. Please make sure that you CCK is installed properly.");
|
||||
return;
|
||||
}
|
||||
var overrideController = new AnimatorOverrideController();
|
||||
overrideController.runtimeAnimatorController = AssetDatabase.LoadAssetAtPath<AnimatorController>(AssetDatabase.GUIDToAssetPath(guids[0]));
|
||||
|
||||
AssetDatabase.CreateAsset (overrideController, path);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
11
Assets/ABI.CCK/Scripts/Editor/CCK_Tools.cs.meta
Executable file
11
Assets/ABI.CCK/Scripts/Editor/CCK_Tools.cs.meta
Executable file
|
@ -0,0 +1,11 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 129e14ac20be5574bbd61c36906281a8
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
103
Assets/ABI.CCK/Scripts/Editor/CVRDistanceLodEditor.cs
Executable file
103
Assets/ABI.CCK/Scripts/Editor/CVRDistanceLodEditor.cs
Executable file
|
@ -0,0 +1,103 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text.RegularExpressions;
|
||||
using ABI.CCK.Components;
|
||||
using UnityEditor;
|
||||
using UnityEditorInternal;
|
||||
using UnityEngine;
|
||||
|
||||
namespace ABI.CCK.Scripts.Editor
|
||||
{
|
||||
[CustomEditor(typeof(ABI.CCK.Components.CVRDistanceLod), true)]
|
||||
public class CVRDistanceLodEditor : UnityEditor.Editor
|
||||
{
|
||||
private CVRDistanceLod _lod;
|
||||
|
||||
private ReorderableList reorderableList;
|
||||
|
||||
private CVRDistanceLodGroup entity;
|
||||
|
||||
private void InitializeList()
|
||||
{
|
||||
reorderableList = new ReorderableList(_lod.Groups, typeof(CVRDistanceLodGroup),
|
||||
false, true, true, true);
|
||||
reorderableList.drawHeaderCallback = OnDrawHeader;
|
||||
reorderableList.drawElementCallback = OnDrawElement;
|
||||
reorderableList.elementHeightCallback = OnHeightElement;
|
||||
reorderableList.onAddCallback = OnAdd;
|
||||
reorderableList.onChangedCallback = OnChanged;
|
||||
}
|
||||
|
||||
private void OnChanged(ReorderableList list)
|
||||
{
|
||||
//EditorUtility.SetDirty(target);
|
||||
}
|
||||
|
||||
private void OnAdd(ReorderableList list)
|
||||
{
|
||||
_lod.Groups.Add(new CVRDistanceLodGroup());
|
||||
Repaint();
|
||||
}
|
||||
|
||||
private float OnHeightElement(int index)
|
||||
{
|
||||
return EditorGUIUtility.singleLineHeight * 3 * 1.25f;
|
||||
}
|
||||
|
||||
private void OnDrawElement(Rect rect, int index, bool isactive, bool isfocused)
|
||||
{
|
||||
if (index > _lod.Groups.Count) return;
|
||||
entity = _lod.Groups[index];
|
||||
|
||||
rect.y += 2;
|
||||
rect.x += 12;
|
||||
rect.width -= 12;
|
||||
Rect _rect = new Rect(rect.x, rect.y, 100, EditorGUIUtility.singleLineHeight);
|
||||
|
||||
EditorGUI.LabelField(_rect, "Game Object");
|
||||
|
||||
_rect.x += 100;
|
||||
_rect.width = rect.width - 100;
|
||||
|
||||
entity.GameObject = (GameObject) EditorGUI.ObjectField(_rect, entity.GameObject, typeof(GameObject), true);
|
||||
|
||||
rect.y += EditorGUIUtility.singleLineHeight * 1.25f;
|
||||
_rect = new Rect(rect.x, rect.y, 100, EditorGUIUtility.singleLineHeight);
|
||||
|
||||
EditorGUI.LabelField(_rect, "Min Distance");
|
||||
|
||||
_rect.x += 100;
|
||||
_rect.width = rect.width - 100;
|
||||
|
||||
entity.MinDistance = EditorGUI.FloatField(_rect, entity.MinDistance);
|
||||
|
||||
rect.y += EditorGUIUtility.singleLineHeight * 1.25f;
|
||||
_rect = new Rect(rect.x, rect.y, 100, EditorGUIUtility.singleLineHeight);
|
||||
|
||||
EditorGUI.LabelField(_rect, "Max Distance");
|
||||
|
||||
_rect.x += 100;
|
||||
_rect.width = rect.width - 100;
|
||||
|
||||
entity.MaxDistance = EditorGUI.FloatField(_rect, entity.MaxDistance);
|
||||
}
|
||||
|
||||
private void OnDrawHeader(Rect rect)
|
||||
{
|
||||
Rect _rect = new Rect(rect.x, rect.y, rect.width, EditorGUIUtility.singleLineHeight);
|
||||
|
||||
GUI.Label(_rect, "Groups");
|
||||
}
|
||||
|
||||
|
||||
public override void OnInspectorGUI()
|
||||
{
|
||||
if (_lod == null) _lod = (CVRDistanceLod) target;
|
||||
|
||||
_lod.distance3D = EditorGUILayout.Toggle("3D Distance", _lod.distance3D);
|
||||
|
||||
if (reorderableList == null) InitializeList();
|
||||
reorderableList.DoLayoutList();
|
||||
}
|
||||
}
|
||||
}
|
3
Assets/ABI.CCK/Scripts/Editor/CVRDistanceLodEditor.cs.meta
Executable file
3
Assets/ABI.CCK/Scripts/Editor/CVRDistanceLodEditor.cs.meta
Executable file
|
@ -0,0 +1,3 @@
|
|||
fileFormatVersion: 2
|
||||
guid: e8ae37e2eb38411daaa5786e09de0128
|
||||
timeCreated: 1621047850
|
98
Assets/ABI.CCK/Scripts/Editor/CVRHapticAreaChestEditor.cs
Executable file
98
Assets/ABI.CCK/Scripts/Editor/CVRHapticAreaChestEditor.cs
Executable file
|
@ -0,0 +1,98 @@
|
|||
using System;
|
||||
using ABI.CCK.Components;
|
||||
using UnityEditor;
|
||||
using UnityEngine;
|
||||
|
||||
#pragma warning disable
|
||||
|
||||
[CustomEditor(typeof(CVRHapticAreaChest))]
|
||||
public class CVRHapticAreaChestEditor : UnityEditor.Editor
|
||||
{
|
||||
private CVRHapticAreaChest _hapticsChest;
|
||||
|
||||
private void OnEnable()
|
||||
{
|
||||
_hapticsChest = (CVRHapticAreaChest) target;
|
||||
}
|
||||
|
||||
private void OnSceneGUI()
|
||||
{
|
||||
if (_hapticsChest.gameObject.activeInHierarchy)
|
||||
{
|
||||
Event e = Event.current;
|
||||
int controlId = GUIUtility.GetControlID(GetHashCode(), FocusType.Passive);
|
||||
|
||||
var wasMouseDown = false;
|
||||
var preventControls = false;
|
||||
|
||||
if (Event.current.type == EventType.MouseUp && Event.current.button == 0)
|
||||
{
|
||||
preventControls = true;
|
||||
}
|
||||
|
||||
if(Event.current.type == EventType.MouseDown && Event.current.button == 0) {
|
||||
preventControls = true;
|
||||
}
|
||||
|
||||
if (Event.current.button == 0)
|
||||
{
|
||||
preventControls = true;
|
||||
}
|
||||
|
||||
var hapticsTransform = _hapticsChest.transform;
|
||||
var scale = hapticsTransform.localScale;
|
||||
var inverseScale = new Vector3(1 / scale.x, 1 / scale.y, 1 / scale.z);
|
||||
|
||||
var i = 0;
|
||||
var selected = false;
|
||||
foreach (var point in _hapticsChest.HapticPoints40)
|
||||
{
|
||||
var localPoint = point;
|
||||
localPoint.Scale(_hapticsChest.chestAreaSize * 0.5f);
|
||||
|
||||
if (i == _hapticsChest.selectedPoint)
|
||||
{
|
||||
Handles.color = Color.cyan;
|
||||
|
||||
Vector3 pos = hapticsTransform.TransformPoint(Vector3.Scale(_hapticsChest.HapticPoints40[i], inverseScale));
|
||||
|
||||
EditorGUI.BeginChangeCheck();
|
||||
Vector3 pointPosition = Handles.PositionHandle(pos, _hapticsChest.transform.rotation);
|
||||
if (EditorGUI.EndChangeCheck())
|
||||
{
|
||||
Undo.RecordObject(_hapticsChest, "CVR Haptic Chest Point Change");
|
||||
var newLocalPoint = _hapticsChest.transform.InverseTransformPoint(pointPosition);
|
||||
newLocalPoint.Scale(_hapticsChest.transform.lossyScale);
|
||||
Debug.Log(newLocalPoint);
|
||||
//_hapticsChest.HapticPoints40[i].z = newLocalPoint.z;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
Handles.color = Color.yellow;
|
||||
}
|
||||
|
||||
/*if (Handles.Button(_hapticsChest.transform.TransformPoint(localPoint), _hapticsChest.transform.rotation, 0.01f, 0.01f,
|
||||
Handles.CubeHandleCap))
|
||||
{
|
||||
if (_hapticsChest.selectedPoint == i)
|
||||
{
|
||||
_hapticsChest.selectedPoint = -1;
|
||||
}
|
||||
else
|
||||
{
|
||||
_hapticsChest.selectedPoint = i;
|
||||
}
|
||||
selected = true;
|
||||
}*/
|
||||
|
||||
i++;
|
||||
}
|
||||
|
||||
if (e.type == EventType.Layout && preventControls && selected)
|
||||
{
|
||||
HandleUtility.AddDefaultControl(controlId);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
11
Assets/ABI.CCK/Scripts/Editor/CVRHapticAreaChestEditor.cs.meta
Executable file
11
Assets/ABI.CCK/Scripts/Editor/CVRHapticAreaChestEditor.cs.meta
Executable file
|
@ -0,0 +1,11 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 001de8f7e84b47b985bc4a7b01553f74
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
191
Assets/ABI.CCK/Scripts/Editor/CVRMaterialDriverEditor.cs
Executable file
191
Assets/ABI.CCK/Scripts/Editor/CVRMaterialDriverEditor.cs
Executable file
|
@ -0,0 +1,191 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text.RegularExpressions;
|
||||
using ABI.CCK.Components;
|
||||
using UnityEditor;
|
||||
using UnityEditorInternal;
|
||||
using UnityEngine;
|
||||
using UnityEngine.Rendering;
|
||||
|
||||
namespace ABI.CCK.Scripts.Editor
|
||||
{
|
||||
[CustomEditor(typeof(ABI.CCK.Components.CVRMaterialDriver))]
|
||||
public class CVRMaterialDriverEditor : UnityEditor.Editor
|
||||
{
|
||||
private CVRMaterialDriver _driver;
|
||||
|
||||
private ReorderableList reorderableList;
|
||||
|
||||
private CVRMaterialDriverTask entity;
|
||||
|
||||
private void InitializeList()
|
||||
{
|
||||
reorderableList = new ReorderableList(_driver.tasks, typeof(CVRMaterialDriverTask),
|
||||
true, true, true, true);
|
||||
reorderableList.drawHeaderCallback = OnDrawHeader;
|
||||
reorderableList.drawElementCallback = OnDrawElement;
|
||||
reorderableList.elementHeightCallback = OnHeightElement;
|
||||
reorderableList.onAddCallback = OnAdd;
|
||||
reorderableList.onChangedCallback = OnChanged;
|
||||
}
|
||||
|
||||
private void OnChanged(ReorderableList list)
|
||||
{
|
||||
//EditorUtility.SetDirty(target);
|
||||
}
|
||||
|
||||
private void OnAdd(ReorderableList list)
|
||||
{
|
||||
if (_driver.tasks.Count >= 16) return;
|
||||
_driver.tasks.Add(new CVRMaterialDriverTask());
|
||||
Repaint();
|
||||
}
|
||||
|
||||
private float OnHeightElement(int index)
|
||||
{
|
||||
return EditorGUIUtility.singleLineHeight * 3 * 1.25f;
|
||||
}
|
||||
|
||||
private void OnDrawElement(Rect rect, int index, bool isactive, bool isfocused)
|
||||
{
|
||||
if (index > _driver.tasks.Count) return;
|
||||
entity = _driver.tasks[index];
|
||||
|
||||
rect.y += 2;
|
||||
rect.x += 12;
|
||||
rect.width -= 12;
|
||||
Rect _rect = new Rect(rect.x, rect.y, 100, EditorGUIUtility.singleLineHeight);
|
||||
|
||||
EditorGUI.LabelField(_rect, "Renderer");
|
||||
|
||||
_rect.x += 100;
|
||||
_rect.width = rect.width - 100;
|
||||
|
||||
entity.Renderer = (Renderer) EditorGUI.ObjectField(_rect, entity.Renderer, typeof(Renderer), true);
|
||||
|
||||
rect.y += EditorGUIUtility.singleLineHeight * 1.25f;
|
||||
_rect = new Rect(rect.x, rect.y, 100, EditorGUIUtility.singleLineHeight);
|
||||
|
||||
var materialList = new Dictionary<int, string>();
|
||||
if (entity.Renderer != null)
|
||||
{
|
||||
for (var i = 0; i < entity.Renderer.sharedMaterials.Length; i++)
|
||||
{
|
||||
if (entity.Renderer.sharedMaterials[i] != null)
|
||||
{
|
||||
materialList.Add(i, entity.Renderer.sharedMaterials[i].name + "[" + i + "]");
|
||||
}
|
||||
else
|
||||
{
|
||||
materialList.Add(i, "None[" + i + "]");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
var materialNames = new string[materialList.Count];
|
||||
materialList.Values.CopyTo(materialNames, 0);
|
||||
var materialIndeces = new int[materialList.Count];
|
||||
materialList.Keys.CopyTo(materialIndeces, 0);
|
||||
|
||||
EditorGUI.LabelField(_rect, "Material");
|
||||
|
||||
_rect.x += 100;
|
||||
_rect.width = rect.width - 100;
|
||||
|
||||
entity.Index = EditorGUI.Popup(_rect, entity.Index, materialNames);
|
||||
|
||||
rect.y += EditorGUIUtility.singleLineHeight * 1.25f;
|
||||
_rect = new Rect(rect.x, rect.y, 100, EditorGUIUtility.singleLineHeight);
|
||||
|
||||
var propertyList = new Dictionary<string, string>();
|
||||
var rendererFound = false;
|
||||
|
||||
if (entity.Renderer != null)
|
||||
{
|
||||
int i = entity.Index;
|
||||
var material = entity.Renderer.sharedMaterials[i];
|
||||
if (material != null)
|
||||
{
|
||||
var shader = material.shader;
|
||||
for (var j = 0; j < shader.GetPropertyCount(); j++)
|
||||
{
|
||||
if ((shader.GetPropertyType(j) == ShaderPropertyType.Float ||
|
||||
shader.GetPropertyType(j) == ShaderPropertyType.Range ||
|
||||
shader.GetPropertyType(j) == ShaderPropertyType.Vector ||
|
||||
shader.GetPropertyType(j) == ShaderPropertyType.Color))
|
||||
{
|
||||
var propertyKey = material.name + "[" + i + "]: " + shader.GetPropertyDescription(j) + "(" +
|
||||
shader.GetPropertyName(j) + ")";
|
||||
if (!propertyList.ContainsKey(propertyKey))
|
||||
{
|
||||
propertyList.Add(
|
||||
propertyKey,
|
||||
"REN[" + i + "]:" + shader.GetPropertyName(j)
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
rendererFound = true;
|
||||
}
|
||||
}
|
||||
|
||||
var propertyNames = new string[propertyList.Count];
|
||||
propertyList.Values.CopyTo(propertyNames, 0);
|
||||
var propertyDescriptions = new string[propertyList.Count];
|
||||
propertyList.Keys.CopyTo(propertyDescriptions, 0);
|
||||
|
||||
EditorGUI.LabelField(_rect, "Property");
|
||||
_rect.x += 100;
|
||||
_rect.width = rect.width - 100;
|
||||
var propertyIndex = EditorGUI.Popup(_rect, Array.IndexOf(propertyNames, entity.RendererType + "["+ entity.Index +"]:" + entity.PropertyName), propertyDescriptions);
|
||||
|
||||
if (propertyIndex >= 0)
|
||||
{
|
||||
Regex rx = new Regex(@"^([A-Z]{3})\[(\d+)\]\:(.+)$");
|
||||
var match = rx.Match(propertyNames[propertyIndex]);
|
||||
|
||||
entity.RendererType = match.Groups[1].Value;
|
||||
entity.Index = Convert.ToInt32(match.Groups[2].Value);
|
||||
entity.PropertyName = match.Groups[3].Value;
|
||||
|
||||
var shader = entity.Renderer.sharedMaterials[entity.Index].shader;
|
||||
|
||||
switch (shader.GetPropertyType(shader.FindPropertyIndex(entity.PropertyName)))
|
||||
{
|
||||
case ShaderPropertyType.Float:
|
||||
case ShaderPropertyType.Range:
|
||||
entity.PropertyType = CVRMaterialDriverTask.Type.Float;
|
||||
break;
|
||||
case ShaderPropertyType.Vector:
|
||||
entity.PropertyType = CVRMaterialDriverTask.Type.Vector4;
|
||||
break;
|
||||
case ShaderPropertyType.Color:
|
||||
entity.PropertyType = CVRMaterialDriverTask.Type.Color;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void OnDrawHeader(Rect rect)
|
||||
{
|
||||
Rect _rect = new Rect(rect.x, rect.y, rect.width, EditorGUIUtility.singleLineHeight);
|
||||
|
||||
GUI.Label(_rect, "Materials");
|
||||
}
|
||||
|
||||
|
||||
public override void OnInspectorGUI()
|
||||
{
|
||||
if (_driver == null) _driver = (CVRMaterialDriver) target;
|
||||
|
||||
base.OnInspectorGUI();
|
||||
|
||||
EditorGUILayout.Space();
|
||||
|
||||
if (reorderableList == null) InitializeList();
|
||||
reorderableList.DoLayoutList();
|
||||
}
|
||||
|
||||
}
|
||||
}
|
3
Assets/ABI.CCK/Scripts/Editor/CVRMaterialDriverEditor.cs.meta
Executable file
3
Assets/ABI.CCK/Scripts/Editor/CVRMaterialDriverEditor.cs.meta
Executable file
|
@ -0,0 +1,3 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 4c4250ecf70741a4af371d128b50158f
|
||||
timeCreated: 1620873035
|
28
Assets/ABI.CCK/Scripts/Editor/ReadOnlyDrawer.cs
Executable file
28
Assets/ABI.CCK/Scripts/Editor/ReadOnlyDrawer.cs
Executable file
|
@ -0,0 +1,28 @@
|
|||
using UnityEditor;
|
||||
using UnityEngine;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// This class contain custom drawer for ReadOnly attribute.
|
||||
/// </summary>
|
||||
[CustomPropertyDrawer(typeof(ReadOnlyAttribute))]
|
||||
public class ReadOnlyDrawer : PropertyDrawer
|
||||
{
|
||||
/// <summary>
|
||||
/// Unity method for drawing GUI in Editor
|
||||
/// </summary>
|
||||
/// <param name="position">Position.</param>
|
||||
/// <param name="property">Property.</param>
|
||||
/// <param name="label">Label.</param>
|
||||
public override void OnGUI(Rect position, SerializedProperty property, GUIContent label)
|
||||
{
|
||||
// Saving previous GUI enabled value
|
||||
var previousGUIState = GUI.enabled;
|
||||
// Disabling edit for property
|
||||
GUI.enabled = false;
|
||||
// Drawing Property
|
||||
EditorGUI.PropertyField(position, property, label);
|
||||
// Setting old GUI enabled value
|
||||
GUI.enabled = previousGUIState;
|
||||
}
|
||||
}
|
3
Assets/ABI.CCK/Scripts/Editor/ReadOnlyDrawer.cs.meta
Executable file
3
Assets/ABI.CCK/Scripts/Editor/ReadOnlyDrawer.cs.meta
Executable file
|
@ -0,0 +1,3 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 9e9b55e4a49846738a40daa8b2fff3ca
|
||||
timeCreated: 1646994870
|
33
Assets/ABI.CCK/Scripts/Health.cs
Executable file
33
Assets/ABI.CCK/Scripts/Health.cs
Executable file
|
@ -0,0 +1,33 @@
|
|||
using UnityEngine;
|
||||
|
||||
namespace ABI.CCK.Scripts
|
||||
{
|
||||
public class Health : MonoBehaviour
|
||||
{
|
||||
public string referenceID = string.Empty;
|
||||
|
||||
[Header("Health")]
|
||||
public float healthBaseAmount = 100f;
|
||||
public float healthMaxAmount = 100f;
|
||||
[Header("Health Regeneration")]
|
||||
public float healthRegenerationDelay = 0f;
|
||||
public float healthRegenerationRate = 0f;
|
||||
public float healthRegenerationCap = 0f;
|
||||
|
||||
[Header("Armor")]
|
||||
public float armorBaseAmount = 0f;
|
||||
public float armorMaxAmount = 0f;
|
||||
[Header("Armor Regeneration")]
|
||||
public float armorRegenerationDelay = 0f;
|
||||
public float armorRegenerationRate = 0f;
|
||||
public float armorRegenerationCap = 0f;
|
||||
|
||||
[Header("Shield")]
|
||||
public float shieldBaseAmount = 0f;
|
||||
public float shieldMaxAmount = 0f;
|
||||
[Header("Shield Regeneration")]
|
||||
public float shieldRegenerationDelay = 0f;
|
||||
public float shieldRegenerationRate = 0f;
|
||||
public float shieldRegenerationCap = 0f;
|
||||
}
|
||||
}
|
3
Assets/ABI.CCK/Scripts/Health.cs.meta
Executable file
3
Assets/ABI.CCK/Scripts/Health.cs.meta
Executable file
|
@ -0,0 +1,3 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 81d61f5e47a746ef93dfc0e92ff81afd
|
||||
timeCreated: 1651091086
|
7
Assets/ABI.CCK/Scripts/ReadOnlyAttribute.cs
Executable file
7
Assets/ABI.CCK/Scripts/ReadOnlyAttribute.cs
Executable file
|
@ -0,0 +1,7 @@
|
|||
using UnityEngine;
|
||||
|
||||
/// <summary>
|
||||
/// Read Only attribute.
|
||||
/// Attribute is use only to mark ReadOnly properties.
|
||||
/// </summary>
|
||||
public class ReadOnlyAttribute : PropertyAttribute { }
|
3
Assets/ABI.CCK/Scripts/ReadOnlyAttribute.cs.meta
Executable file
3
Assets/ABI.CCK/Scripts/ReadOnlyAttribute.cs.meta
Executable file
|
@ -0,0 +1,3 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 0cb6a29e21774c3eb991d24427024da7
|
||||
timeCreated: 1646994837
|
8
Assets/ABI.CCK/Scripts/Runtime.meta
Executable file
8
Assets/ABI.CCK/Scripts/Runtime.meta
Executable file
|
@ -0,0 +1,8 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 5cb09016cf422624bad36b0c270dfef1
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
205
Assets/ABI.CCK/Scripts/Runtime/CCK_RuntimeUploaderMaster.cs
Executable file
205
Assets/ABI.CCK/Scripts/Runtime/CCK_RuntimeUploaderMaster.cs
Executable file
|
@ -0,0 +1,205 @@
|
|||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Xml.Linq;
|
||||
using System.Xml.XPath;
|
||||
using ABI.CCK.Components;
|
||||
using ABI.CCK.Scripts;
|
||||
using Abi.Newtonsoft.Json;
|
||||
using UnityEditor;
|
||||
using UnityEngine;
|
||||
using UnityEngine.Networking;
|
||||
using UnityEngine.Rendering;
|
||||
|
||||
namespace ABI.CCK.Scripts.Runtime
|
||||
{
|
||||
public class CCK_RuntimeUploaderMaster : MonoBehaviour
|
||||
{
|
||||
public OnGuiUpdater updater;
|
||||
private UnityWebRequest req;
|
||||
|
||||
public bool isUploading;
|
||||
private bool _stateTransfer = false;
|
||||
public float progress = 0f;
|
||||
|
||||
public string encryption;
|
||||
|
||||
public void StartUpload()
|
||||
{
|
||||
//Build string
|
||||
var type = updater.asset.type;
|
||||
var sfwLevel = string.Empty;
|
||||
var overwritePic = string.Empty;
|
||||
|
||||
if (!File.Exists($"{Application.persistentDataPath}/bundle.png")) gameObject.GetComponent<CCK_TexImageCreation>().SaveTexture(updater.camObj.GetComponent<Camera>(), updater.tex);
|
||||
StartCoroutine(UploadAssetAndSendInformation(updater.asset.GetComponent<CVRAssetInfo>().objectId, type.ToString(), sfwLevel, updater.assetName.text, updater.assetDesc.text, updater.dontOverridePicture.isOn));
|
||||
}
|
||||
|
||||
private IEnumerator UploadAssetAndSendInformation(string contentId, string type, string sfwLevel, string assetName, string assetDesc, bool overwritePic)
|
||||
{
|
||||
string[] path = null;
|
||||
if (type == "Avatar")
|
||||
{
|
||||
path = new string[3];
|
||||
path[0] = $"file://{Application.persistentDataPath}/bundle.cvravatar";
|
||||
path[1] = $"file://{Application.persistentDataPath}/bundle.cvravatar.manifest";
|
||||
path[2] = $"file://{Application.persistentDataPath}/bundle.png";
|
||||
}
|
||||
if (type == "World")
|
||||
{
|
||||
path = new string[5];
|
||||
path[0] = $"file://{Application.persistentDataPath}/bundle.cvrworld";
|
||||
path[1] = $"file://{Application.persistentDataPath}/bundle.cvrworld.manifest";
|
||||
path[2] = $"file://{Application.persistentDataPath}/bundle.png";
|
||||
path[3] = $"file://{Application.persistentDataPath}/bundle_pano_1024.png";
|
||||
path[4] = $"file://{Application.persistentDataPath}/bundle_pano_4096.png";
|
||||
}
|
||||
if (type == "Spawnable")
|
||||
{
|
||||
path = new string[3];
|
||||
path[0] = $"file://{Application.persistentDataPath}/bundle.cvrprop";
|
||||
path[1] = $"file://{Application.persistentDataPath}/bundle.cvrprop.manifest";
|
||||
path[2] = $"file://{Application.persistentDataPath}/bundle.png";
|
||||
}
|
||||
|
||||
UnityWebRequest[] files = new UnityWebRequest[path.Length];
|
||||
WWWForm form = new WWWForm();
|
||||
|
||||
#if UNITY_EDITOR
|
||||
form.AddField("Username", EditorPrefs.GetString("m_ABI_Username"));
|
||||
form.AddField("AccessKey", EditorPrefs.GetString("m_ABI_Key"));
|
||||
#endif
|
||||
form.AddField("ContentId", contentId);
|
||||
form.AddField("ContentType", type);
|
||||
|
||||
form.AddField("ContentName", assetName);
|
||||
form.AddField("ContentDescription", assetDesc);
|
||||
form.AddField("ContentChangelog", updater.assetChangelog.text);
|
||||
|
||||
if (updater.LoudAudio.isOn) form.AddField("Tag_LoudAudio", 1);
|
||||
if (updater.LongRangeAudio.isOn) form.AddField("Tag_LongRangeAudio", 1);
|
||||
if (updater.ContainsMusic.isOn) form.AddField("Tag_ContainsMusic", 1);
|
||||
if (updater.SpawnAudio.isOn) form.AddField("Tag_SpawnAudio", 1);
|
||||
|
||||
if (updater.FlashingColors.isOn) form.AddField("Tag_FlashingColors", 1);
|
||||
if (updater.FlashingLights.isOn) form.AddField("Tag_FlashingLights", 1);
|
||||
if (updater.ExtremelyBright.isOn) form.AddField("Tag_ExtremelyBright", 1);
|
||||
if (updater.ScreenEffects.isOn) form.AddField("Tag_ScreenEffects", 1);
|
||||
if (updater.ParticleSystems.isOn) form.AddField("Tag_ParticleSystems", 1);
|
||||
|
||||
if (updater.Violence.isOn) form.AddField("Tag_Violence", 1);
|
||||
if (updater.Gore.isOn) form.AddField("Tag_Gore", 1);
|
||||
if (updater.Horror.isOn) form.AddField("Tag_Horror", 1);
|
||||
if (updater.Jumpscare.isOn) form.AddField("Tag_Jumpscare", 1);
|
||||
|
||||
if (updater.ExcessivelyHuge.isOn) form.AddField("Tag_ExcessivelyHuge", 1);
|
||||
if (updater.ExcessivelySmall.isOn) form.AddField("Tag_ExcessivelySmall", 1);
|
||||
|
||||
if (updater.Suggestive.isOn) form.AddField("Tag_Suggestive", 1);
|
||||
if (updater.Nudity.isOn) form.AddField("Tag_Nudity", 1);
|
||||
|
||||
if (updater.SetAsActive.isOn) form.AddField("Flag_SetFileAsActive", 1);
|
||||
if (overwritePic) form.AddField("Flag_OverwritePicture", 1);
|
||||
|
||||
for (int i = 0; i < files.Length; i++)
|
||||
{
|
||||
string fieldName = string.Empty;
|
||||
switch (i)
|
||||
{
|
||||
case 0: fieldName = "AssetFile"; break;
|
||||
case 1: fieldName = "AssetManifestFile"; break;
|
||||
case 2: fieldName = "AssetThumbnail"; break;
|
||||
case 3: fieldName = "AssetPano1K"; break;
|
||||
case 4: fieldName = "AssetPano4K"; break;
|
||||
}
|
||||
files[i] = UnityWebRequest.Get(path[i]);
|
||||
yield return files[i].SendWebRequest();
|
||||
form.AddBinaryData(fieldName, files[i].downloadHandler.data, Path.GetFileName(path[i]));
|
||||
}
|
||||
#if UNITY_EDITOR
|
||||
req = UnityWebRequest.Post($"https://{updater.UploadLocation}/v1/upload-file", form);
|
||||
#endif
|
||||
isUploading = true;
|
||||
yield return req.SendWebRequest();
|
||||
|
||||
if (req.isHttpError || req.isNetworkError)
|
||||
Debug.LogError(req.error);
|
||||
}
|
||||
|
||||
private IEnumerator WriteState()
|
||||
{
|
||||
_stateTransfer = true;
|
||||
yield return new WaitForSeconds(0.15f);
|
||||
float percent = 0f;
|
||||
while (99f > percent)
|
||||
{
|
||||
var values = new Dictionary<string, string>
|
||||
{
|
||||
{"ContentType", updater.asset.type.ToString()},
|
||||
{"ContentId", updater.asset.objectId}
|
||||
};
|
||||
|
||||
using (UnityWebRequest uwr =
|
||||
UnityWebRequest.Post($"https://{updater.UploadLocation}/v1/progress-for-file", values))
|
||||
{
|
||||
yield return uwr.SendWebRequest();
|
||||
|
||||
if (uwr.isNetworkError || uwr.isHttpError)
|
||||
{
|
||||
Debug.Log(
|
||||
"[CCK:RuntimeUploader] Unable to connect to the edge we are uploading to. There might be a network issue.");
|
||||
yield break;
|
||||
}
|
||||
|
||||
UploadProgressStatus s =
|
||||
JsonConvert.DeserializeObject<UploadProgressStatus>(uwr.downloadHandler.text);
|
||||
if (s != null)
|
||||
{
|
||||
updater.processingProgress.fillAmount = s.Percent / 100;
|
||||
if (!string.IsNullOrEmpty(s.CurrentStep)) updater.processingProgressText.text = CCKLocalizationProvider.GetLocalizedText(s.CurrentStep);
|
||||
if (s.Percent > 99f) ShowResponseDialog(s.CurrentStep);
|
||||
percent = s.Percent;
|
||||
}
|
||||
}
|
||||
|
||||
yield return new WaitForSeconds(0.25f);
|
||||
}
|
||||
}
|
||||
|
||||
void Update()
|
||||
{
|
||||
if (isUploading)
|
||||
{
|
||||
#if UNITY_EDITOR
|
||||
updater.uploadProgress.fillAmount = req.uploadProgress;
|
||||
updater.uploadProgressText.text = (req.uploadProgress * 100f).ToString("F2") + "%";
|
||||
if (req.uploadProgress * 100f > 99.9f)
|
||||
{
|
||||
updater.uploadProgressText.text = "100%";
|
||||
if (!_stateTransfer) StartCoroutine(WriteState());
|
||||
}
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
private void ShowResponseDialog(string text)
|
||||
{
|
||||
isUploading = false;
|
||||
#if UNITY_EDITOR
|
||||
EditorUtility.ClearProgressBar();
|
||||
if (UnityEditor.EditorUtility.DisplayDialog("Alpha Blend Interactive CCK",$"Message from server: {CCKLocalizationProvider.GetLocalizedText(text)}","Okay"))
|
||||
{
|
||||
EditorApplication.isPlaying = false;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
[Serializable]
|
||||
public class UploadProgressStatus
|
||||
{
|
||||
public string CurrentStep { get; set; }
|
||||
public float Percent { get; set; }
|
||||
}
|
||||
}
|
11
Assets/ABI.CCK/Scripts/Runtime/CCK_RuntimeUploaderMaster.cs.meta
Executable file
11
Assets/ABI.CCK/Scripts/Runtime/CCK_RuntimeUploaderMaster.cs.meta
Executable file
|
@ -0,0 +1,11 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 6256163c59631774c9883799367a37fa
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
182
Assets/ABI.CCK/Scripts/Runtime/CCK_RuntimeVariableStream.cs
Executable file
182
Assets/ABI.CCK/Scripts/Runtime/CCK_RuntimeVariableStream.cs
Executable file
|
@ -0,0 +1,182 @@
|
|||
using System;
|
||||
using System.Collections;
|
||||
using System.Net.Http;
|
||||
using System.Text;
|
||||
using Abi.Newtonsoft.Json;
|
||||
using UnityEditor;
|
||||
using UnityEngine;
|
||||
|
||||
namespace ABI.CCK.Scripts.Runtime
|
||||
{
|
||||
public class CCK_RuntimeVariableStream : MonoBehaviour
|
||||
{
|
||||
private void Start()
|
||||
{
|
||||
StartCoroutine(StreamVars());
|
||||
}
|
||||
|
||||
private IEnumerator StreamVars()
|
||||
{
|
||||
OnGuiUpdater updater = gameObject.GetComponent<OnGuiUpdater>();
|
||||
string type = updater.asset.type.ToString();
|
||||
|
||||
using (HttpClient httpclient = new HttpClient())
|
||||
{
|
||||
HttpResponseMessage response;
|
||||
response = httpclient.PostAsync(
|
||||
"https://api.abinteractive.net/1/cck/parameterStream",
|
||||
new StringContent(JsonConvert.SerializeObject(new
|
||||
{
|
||||
ContentType = type, ContentId = updater.asset.objectId,
|
||||
#if UNITY_EDITOR
|
||||
Username = EditorPrefs.GetString("m_ABI_Username"),
|
||||
AccessKey = EditorPrefs.GetString("m_ABI_Key"),
|
||||
UploadRegion = EditorPrefs.GetInt("ABI_PREF_UPLOAD_REGION").ToString()
|
||||
#endif
|
||||
}),
|
||||
Encoding.UTF8, "application/json")
|
||||
).GetAwaiter().GetResult();
|
||||
|
||||
if (response.IsSuccessStatusCode)
|
||||
{
|
||||
string result = response.Content.ReadAsStringAsync().GetAwaiter().GetResult();
|
||||
BaseResponse<VariableStreamResponse> streamResponse = Abi.Newtonsoft.Json.JsonConvert .DeserializeObject<BaseResponse<VariableStreamResponse>>(result);
|
||||
|
||||
|
||||
|
||||
if (streamResponse == null || streamResponse.Data == null)
|
||||
{
|
||||
#if UNITY_EDITOR
|
||||
EditorUtility.ClearProgressBar();
|
||||
if (UnityEditor.EditorUtility.DisplayDialog("Alpha Blend Interactive CCK",
|
||||
"Request failed. Unable to connect to the Gateway. The Gateway might be unavailable. Check https://status.abinteractive.net for more info.",
|
||||
"Okay"))
|
||||
{
|
||||
EditorApplication.isPlaying = false;
|
||||
}
|
||||
#endif
|
||||
yield break;
|
||||
}
|
||||
|
||||
if (!streamResponse.Data.HasPermission)
|
||||
{
|
||||
#if UNITY_EDITOR
|
||||
EditorUtility.ClearProgressBar();
|
||||
if (UnityEditor.EditorUtility.DisplayDialog("Alpha Blend Interactive CCK",
|
||||
"Request failed. The provided content ID does not belong to your account.", "Okay"))
|
||||
{
|
||||
EditorApplication.isPlaying = false;
|
||||
}
|
||||
#endif
|
||||
yield break;
|
||||
}
|
||||
|
||||
if (streamResponse.Data.IsAtUploadLimit)
|
||||
{
|
||||
#if UNITY_EDITOR
|
||||
EditorUtility.ClearProgressBar();
|
||||
if (UnityEditor.EditorUtility.DisplayDialog("Alpha Blend Interactive CCK",
|
||||
"Request failed. Your account has reached the upload limit. Please consider buying the Unlocked account.",
|
||||
"Okay"))
|
||||
{
|
||||
EditorApplication.isPlaying = false;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
if (streamResponse.Data.IsBannedFromUploading)
|
||||
{
|
||||
#if UNITY_EDITOR
|
||||
EditorUtility.ClearProgressBar();
|
||||
if (UnityEditor.EditorUtility.DisplayDialog("Alpha Blend Interactive CCK",
|
||||
"Request failed. Your upload permissions are suspended. For more information, consult your moderation profile in the ABI community hub.",
|
||||
"Okay"))
|
||||
{
|
||||
EditorApplication.isPlaying = false;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
updater.UploadLocation = streamResponse.Data.UploadLocation;
|
||||
|
||||
updater.assetName.text = streamResponse.Data.ObjectName;
|
||||
updater.assetDesc.text = streamResponse.Data.ObjectDescription;
|
||||
|
||||
updater.LoudAudio.isOn = streamResponse.Data.LoudAudio;
|
||||
updater.LongRangeAudio.isOn = streamResponse.Data.LongRangeAudio;
|
||||
updater.SpawnAudio.isOn = streamResponse.Data.SpawnAudio;
|
||||
updater.ContainsMusic.isOn = streamResponse.Data.ContainsMusic;
|
||||
|
||||
updater.ScreenEffects.isOn = streamResponse.Data.ScreenFx;
|
||||
updater.FlashingColors.isOn = streamResponse.Data.FlashingColors;
|
||||
updater.FlashingLights.isOn = streamResponse.Data.FlashingLights;
|
||||
updater.ExtremelyBright.isOn = streamResponse.Data.ExtremelyBright;
|
||||
updater.ParticleSystems.isOn = streamResponse.Data.ParticleSystems;
|
||||
|
||||
updater.Violence.isOn = streamResponse.Data.Violence;
|
||||
updater.Gore.isOn = streamResponse.Data.Gore;
|
||||
updater.Horror.isOn = streamResponse.Data.Horror;
|
||||
updater.Jumpscare.isOn = streamResponse.Data.Jumpscare;
|
||||
|
||||
updater.ExcessivelySmall.isOn = streamResponse.Data.ExtremelySmall;
|
||||
updater.ExcessivelyHuge.isOn = streamResponse.Data.ExtremelyHuge;
|
||||
|
||||
updater.Suggestive.isOn = streamResponse.Data.Suggestive;
|
||||
updater.Nudity.isOn = streamResponse.Data.Nudity;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
[Serializable]
|
||||
public class VariableStreamResponse
|
||||
{
|
||||
public bool HasPermission { get; set; }
|
||||
public bool IsAtUploadLimit { get; set; }
|
||||
public bool IsBannedFromUploading { get; set; }
|
||||
|
||||
public string UploadLocation { get; set; }
|
||||
|
||||
public string ObjectName { get; set; }
|
||||
public string ObjectDescription { get; set; }
|
||||
|
||||
public bool LoudAudio { get; set; }
|
||||
public bool LongRangeAudio { get; set; }
|
||||
public bool SpawnAudio { get; set; }
|
||||
public bool ContainsMusic { get; set; }
|
||||
|
||||
public bool ScreenFx { get; set; }
|
||||
public bool FlashingColors { get; set; }
|
||||
public bool FlashingLights { get; set; }
|
||||
public bool ExtremelyBright { get; set; }
|
||||
public bool ParticleSystems { get; set; }
|
||||
|
||||
public bool Violence { get; set; }
|
||||
public bool Gore { get; set; }
|
||||
public bool Horror { get; set; }
|
||||
public bool Jumpscare { get; set; }
|
||||
|
||||
public bool ExtremelySmall { get; set; }
|
||||
public bool ExtremelyHuge { get; set; }
|
||||
|
||||
public bool Suggestive { get; set; }
|
||||
public bool Nudity { get; set; }
|
||||
}
|
||||
|
||||
public class BaseResponse<T>
|
||||
{
|
||||
public string Message { get; set; }
|
||||
public T Data { get; set; }
|
||||
|
||||
public BaseResponse(string message = null, T data = default)
|
||||
{
|
||||
Message = message;
|
||||
Data = data;
|
||||
}
|
||||
|
||||
public override string ToString()
|
||||
{
|
||||
return JsonConvert.SerializeObject(this);
|
||||
}
|
||||
}
|
||||
}
|
3
Assets/ABI.CCK/Scripts/Runtime/CCK_RuntimeVariableStream.cs.meta
Executable file
3
Assets/ABI.CCK/Scripts/Runtime/CCK_RuntimeVariableStream.cs.meta
Executable file
|
@ -0,0 +1,3 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 43627592c5424481910b2e2c00ff9078
|
||||
timeCreated: 1574699299
|
19
Assets/ABI.CCK/Scripts/Runtime/CCK_TexImageCreation.cs
Executable file
19
Assets/ABI.CCK/Scripts/Runtime/CCK_TexImageCreation.cs
Executable file
|
@ -0,0 +1,19 @@
|
|||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
|
||||
public class CCK_TexImageCreation : MonoBehaviour
|
||||
{
|
||||
public void SaveTexture (Camera cam, RenderTexture renderTexture,int resWidth = 512, int resHeight = 512) {
|
||||
Texture2D screenShot = new Texture2D(resWidth, resHeight, TextureFormat.RGB24, false);
|
||||
cam.Render();
|
||||
RenderTexture.active = renderTexture;
|
||||
screenShot.ReadPixels(new Rect(0, 0, resWidth, resHeight), 0, 0);
|
||||
screenShot.Apply();
|
||||
cam.targetTexture = null;
|
||||
RenderTexture.active = null;
|
||||
byte[] bytes = screenShot.EncodeToPNG();
|
||||
System.IO.File.WriteAllBytes(Application.persistentDataPath + "/bundle.png", bytes);
|
||||
}
|
||||
|
||||
}
|
11
Assets/ABI.CCK/Scripts/Runtime/CCK_TexImageCreation.cs.meta
Executable file
11
Assets/ABI.CCK/Scripts/Runtime/CCK_TexImageCreation.cs.meta
Executable file
|
@ -0,0 +1,11 @@
|
|||
fileFormatVersion: 2
|
||||
guid: f49ae1874bfcdb74583d0f7bd5b123e6
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
12
Assets/ABI.CCK/Scripts/Runtime/LinkOpener.cs
Executable file
12
Assets/ABI.CCK/Scripts/Runtime/LinkOpener.cs
Executable file
|
@ -0,0 +1,12 @@
|
|||
using UnityEngine;
|
||||
|
||||
namespace ABI.CCK.Scripts.Runtime
|
||||
{
|
||||
public class LinkOpener : MonoBehaviour
|
||||
{
|
||||
public void OpenLink(string url)
|
||||
{
|
||||
Application.OpenURL(url);
|
||||
}
|
||||
}
|
||||
}
|
11
Assets/ABI.CCK/Scripts/Runtime/LinkOpener.cs.meta
Executable file
11
Assets/ABI.CCK/Scripts/Runtime/LinkOpener.cs.meta
Executable file
|
@ -0,0 +1,11 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 795f0798827ab3449b33533e117fb343
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
267
Assets/ABI.CCK/Scripts/Runtime/OnGuiUpdater.cs
Executable file
267
Assets/ABI.CCK/Scripts/Runtime/OnGuiUpdater.cs
Executable file
|
@ -0,0 +1,267 @@
|
|||
using System;
|
||||
using System.Collections;
|
||||
using System.IO;
|
||||
using ABI.CCK.Components;
|
||||
using UnityEditor;
|
||||
using UnityEngine;
|
||||
using UnityEngine.Serialization;
|
||||
using UnityEngine.UI;
|
||||
|
||||
namespace ABI.CCK.Scripts.Runtime
|
||||
{
|
||||
public class OnGuiUpdater : MonoBehaviour
|
||||
{
|
||||
[Space] [Header("Object details")] [Space]
|
||||
public Text uiTitle;
|
||||
public InputField assetName;
|
||||
public InputField assetDesc;
|
||||
public InputField assetChangelog;
|
||||
|
||||
[Space] [Header("Object tags")] [Space]
|
||||
public Toggle LoudAudio;
|
||||
public Toggle LongRangeAudio;
|
||||
public Toggle SpawnAudio;
|
||||
public Toggle ContainsMusic;
|
||||
public Toggle ScreenEffects;
|
||||
public Toggle FlashingColors;
|
||||
public Toggle FlashingLights;
|
||||
public Toggle ExtremelyBright;
|
||||
public Toggle ParticleSystems;
|
||||
public Toggle Violence;
|
||||
public Toggle Gore;
|
||||
public Toggle Horror;
|
||||
public Toggle Jumpscare;
|
||||
public Toggle ExcessivelyHuge;
|
||||
public Toggle ExcessivelySmall;
|
||||
public Toggle Suggestive;
|
||||
public Toggle Nudity;
|
||||
|
||||
public Toggle dontOverridePicture;
|
||||
public Toggle SetAsActive;
|
||||
|
||||
//Regulatory
|
||||
public Toggle contentOwnership;
|
||||
public Toggle tagsCorrect;
|
||||
|
||||
[Space] [Header("Object reference")] [Space]
|
||||
public CVRAssetInfo asset;
|
||||
|
||||
[Space] [Header("UIHelper objects")] [Space]
|
||||
public GameObject camObj;
|
||||
public RenderTexture tex;
|
||||
public RawImage texView;
|
||||
public RawImage texViewBig;
|
||||
public GameObject tagsObject;
|
||||
public GameObject detailsObject;
|
||||
public GameObject legalObject;
|
||||
public GameObject uploadObject;
|
||||
public Image stepOne;
|
||||
public Image stepTwo;
|
||||
public Image stepThree;
|
||||
public Image tagsImage;
|
||||
public Image detailsImage;
|
||||
public Image legalImage;
|
||||
public Image uploadImage;
|
||||
public Text tagsText;
|
||||
public Text detailsText;
|
||||
public Text legalText;
|
||||
public Text uploadText;
|
||||
public Image uploadProgress;
|
||||
public Text uploadProgressText;
|
||||
public Image processingProgress;
|
||||
public Text processingProgressText;
|
||||
public Text assetFileSizeText;
|
||||
public Text assetImageFileSizeText;
|
||||
public Text assetFileManifestSizeText;
|
||||
public Text assetFilePano1SizeText;
|
||||
public Text assetFilePano4SizeText;
|
||||
|
||||
[HideInInspector] public string UploadLocation;
|
||||
|
||||
public CCK_RuntimeUploaderMaster uploader;
|
||||
|
||||
public void ToggleObject(GameObject obj)
|
||||
{
|
||||
obj.SetActive(!obj.activeInHierarchy);
|
||||
}
|
||||
|
||||
public static string ToFileSizeString(long fileSize)
|
||||
{
|
||||
string[] sizes = { "B", "KB", "MB", "GB", "TB" };
|
||||
int order = 0;
|
||||
while (fileSize >= 1024 && order < sizes.Length - 1) {
|
||||
order++;
|
||||
fileSize = fileSize/1024;
|
||||
}
|
||||
|
||||
return $"{fileSize:0.##} {sizes[order]}";
|
||||
}
|
||||
|
||||
void Start()
|
||||
{
|
||||
SwitchPage(0);
|
||||
CVRAssetInfo.AssetType type = asset.GetComponent<CVRAssetInfo>().type;
|
||||
|
||||
if (type == CVRAssetInfo.AssetType.World)
|
||||
{
|
||||
Scripts.Editor.CCK_WorldPreviewCapture.CreatePanoImages();
|
||||
}
|
||||
|
||||
tex = new RenderTexture(512,512,1, RenderTextureFormat.ARGB32);
|
||||
tex.Create();
|
||||
|
||||
camObj = new GameObject();
|
||||
camObj.name = "ShotCam for CVR CCK";
|
||||
camObj.transform.rotation = new Quaternion(0,180,0,0);
|
||||
CVRAvatar avatar = asset.GetComponent<CVRAvatar>();
|
||||
if (asset.type == CVRAssetInfo.AssetType.Avatar) camObj.transform.position = new Vector3(avatar.viewPosition.x, avatar.viewPosition.y, avatar.viewPosition.z *= 5f);
|
||||
var cam = camObj.AddComponent<Camera>();
|
||||
cam.aspect = 1f;
|
||||
cam.nearClipPlane = 0.01f;
|
||||
cam.targetTexture = tex;
|
||||
texView.texture = tex;
|
||||
texViewBig.texture = tex;
|
||||
|
||||
#if UNITY_EDITOR
|
||||
|
||||
#endif
|
||||
|
||||
if (type == CVRAssetInfo.AssetType.Avatar)
|
||||
{
|
||||
assetFileSizeText.text = ToFileSizeString(new FileInfo(Application.persistentDataPath + "/bundle.cvravatar").Length);
|
||||
assetImageFileSizeText.text = "N/A";
|
||||
assetFileManifestSizeText.text = ToFileSizeString(new FileInfo(Application.persistentDataPath + "/bundle.cvravatar.manifest").Length);
|
||||
assetFilePano1SizeText.text = "N/A";
|
||||
assetFilePano4SizeText.text = "N/A";
|
||||
}
|
||||
|
||||
if (type == CVRAssetInfo.AssetType.Spawnable)
|
||||
{
|
||||
assetFileSizeText.text = ToFileSizeString(new FileInfo(Application.persistentDataPath + "/bundle.cvrprop").Length);
|
||||
assetImageFileSizeText.text = "";
|
||||
assetFileManifestSizeText.text = ToFileSizeString(new FileInfo(Application.persistentDataPath + "/bundle.cvrprop.manifest").Length);
|
||||
assetFilePano1SizeText.text = "N/A";
|
||||
assetFilePano4SizeText.text = "N/A";
|
||||
}
|
||||
|
||||
if (type == CVRAssetInfo.AssetType.World)
|
||||
{
|
||||
assetFileSizeText.text = ToFileSizeString(new FileInfo(Application.persistentDataPath + "/bundle.cvrworld").Length);
|
||||
assetImageFileSizeText.text = "N/A";
|
||||
assetFileManifestSizeText.text = ToFileSizeString(new FileInfo(Application.persistentDataPath + "/bundle.cvrworld.manifest").Length);
|
||||
assetFilePano1SizeText.text = ToFileSizeString(new FileInfo(Application.persistentDataPath + "/bundle_pano_1024.png").Length);
|
||||
assetFilePano4SizeText.text = ToFileSizeString(new FileInfo(Application.persistentDataPath + "/bundle_pano_4096.png").Length);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public void SwitchPage(int index)
|
||||
{
|
||||
switch (index)
|
||||
{
|
||||
case 0:
|
||||
tagsObject.SetActive(true);
|
||||
detailsObject.SetActive(false);
|
||||
legalObject.SetActive(false);
|
||||
uploadObject.SetActive(false);
|
||||
stepOne.color = Color.white;
|
||||
stepTwo.color = Color.white;
|
||||
stepThree.color = Color.white;
|
||||
tagsImage.color = Color.yellow;
|
||||
detailsImage.color = Color.white;
|
||||
legalImage.color = Color.white;
|
||||
uploadImage.color = Color.white;
|
||||
tagsText.color = Color.yellow;
|
||||
detailsText.color = Color.white;
|
||||
legalText.color = Color.white;
|
||||
uploadText.color = Color.white;
|
||||
break;
|
||||
case 1:
|
||||
tagsObject.SetActive(false);
|
||||
detailsObject.SetActive(true);
|
||||
legalObject.SetActive(false);
|
||||
uploadObject.SetActive(false);
|
||||
stepOne.color = Color.green;
|
||||
stepTwo.color = Color.white;
|
||||
stepThree.color = Color.white;
|
||||
tagsImage.color = Color.green;
|
||||
detailsImage.color = Color.yellow;
|
||||
legalImage.color = Color.white;
|
||||
uploadImage.color = Color.white;
|
||||
tagsText.color = Color.green;
|
||||
detailsText.color = Color.yellow;
|
||||
legalText.color = Color.white;
|
||||
uploadText.color = Color.white;
|
||||
break;
|
||||
case 2:
|
||||
tagsObject.SetActive(false);
|
||||
detailsObject.SetActive(false);
|
||||
legalObject.SetActive(true);
|
||||
uploadObject.SetActive(false);
|
||||
stepOne.color = Color.green;
|
||||
stepTwo.color = Color.green;
|
||||
stepThree.color = Color.white;
|
||||
tagsImage.color = Color.green;
|
||||
detailsImage.color = Color.green;
|
||||
legalImage.color = Color.yellow;
|
||||
uploadImage.color = Color.white;
|
||||
tagsText.color = Color.green;
|
||||
detailsText.color = Color.green;
|
||||
legalText.color = Color.yellow;
|
||||
uploadText.color = Color.white;
|
||||
break;
|
||||
case 3:
|
||||
tagsObject.SetActive(false);
|
||||
detailsObject.SetActive(false);
|
||||
legalObject.SetActive(false);
|
||||
uploadObject.SetActive(true);
|
||||
stepOne.color = Color.green;
|
||||
stepTwo.color = Color.green;
|
||||
stepThree.color = Color.green;
|
||||
tagsImage.color = Color.green;
|
||||
detailsImage.color = Color.green;
|
||||
legalImage.color = Color.green;
|
||||
uploadImage.color = Color.yellow;
|
||||
tagsText.color = Color.green;
|
||||
detailsText.color = Color.green;
|
||||
legalText.color = Color.green;
|
||||
uploadText.color = Color.yellow;
|
||||
if (string.IsNullOrEmpty(assetName.text))
|
||||
{
|
||||
#if UNITY_EDITOR
|
||||
EditorUtility.DisplayDialog("Alpha Blend Interactive CCK", CCKLocalizationProvider.GetLocalizedText("ABI_UI_BUILDSTEP_UPLOAD_DETAILS_MISSING"), "Okay");
|
||||
#endif
|
||||
SwitchPage(1);
|
||||
return;
|
||||
}
|
||||
|
||||
if (!contentOwnership.isOn || !tagsCorrect.isOn)
|
||||
{
|
||||
#if UNITY_EDITOR
|
||||
EditorUtility.DisplayDialog("Alpha Blend Interactive CCK", CCKLocalizationProvider.GetLocalizedText("ABI_UI_BUILDSTEP_UPLOAD_LEGAL_MISSING"), "Okay");
|
||||
#endif
|
||||
SwitchPage(2);
|
||||
return;
|
||||
}
|
||||
uploader.StartUpload();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
public void MakePhotoAndDisableCamera()
|
||||
{
|
||||
|
||||
Camera c = camObj.GetComponent<Camera>();
|
||||
if (!c.enabled)
|
||||
{
|
||||
c.targetTexture = tex;
|
||||
c.enabled = true;
|
||||
}
|
||||
gameObject.GetComponent<CCK_TexImageCreation>().SaveTexture(c, tex);
|
||||
assetImageFileSizeText.text = ToFileSizeString(new FileInfo(Application.persistentDataPath + "/bundle.png").Length);
|
||||
c.enabled = false;
|
||||
//
|
||||
//StartCoroutine(MakePhotoAndDisableCamera__Internal());
|
||||
}
|
||||
}
|
||||
}
|
11
Assets/ABI.CCK/Scripts/Runtime/OnGuiUpdater.cs.meta
Executable file
11
Assets/ABI.CCK/Scripts/Runtime/OnGuiUpdater.cs.meta
Executable file
|
@ -0,0 +1,11 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 2412f7e29bae9b64fbf2558565dad1ea
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
52
Assets/ABI.CCK/Scripts/ShaderCompatibilityPreprocessor.cs
Executable file
52
Assets/ABI.CCK/Scripts/ShaderCompatibilityPreprocessor.cs
Executable file
|
@ -0,0 +1,52 @@
|
|||
#if UNITY_EDITOR
|
||||
using System.Collections.Generic;
|
||||
using UnityEditor;
|
||||
using UnityEditor.Build;
|
||||
using UnityEditor.Rendering;
|
||||
using UnityEngine;
|
||||
using UnityEngine.Rendering;
|
||||
using System.Text;
|
||||
|
||||
public class ShaderCompatibilityPreprocessor : IPreprocessShaders
|
||||
{
|
||||
public int callbackOrder => 1024;
|
||||
|
||||
private static ShaderKeyword _singlePassKeyword = new ShaderKeyword("UNITY_SINGLE_PASS_STEREO");
|
||||
private static ShaderKeyword _instancedKeyword = new ShaderKeyword("STEREO_INSTANCING_ON");
|
||||
|
||||
public void OnProcessShader(Shader shader, ShaderSnippetData snippet, IList<ShaderCompilerData> data)
|
||||
{
|
||||
if(EditorUserBuildSettings.activeBuildTarget == BuildTarget.StandaloneWindows64)
|
||||
{
|
||||
List<ShaderCompilerData> reworkedData = new List<ShaderCompilerData>();
|
||||
foreach(ShaderCompilerData scd in data)
|
||||
{
|
||||
ShaderCompilerData reworkedScd = scd;
|
||||
ShaderKeywordSet shaderKeywordSet = scd.shaderKeywordSet;
|
||||
if(shaderKeywordSet.IsEnabled(_singlePassKeyword))
|
||||
{
|
||||
shaderKeywordSet.Disable(_singlePassKeyword);
|
||||
shaderKeywordSet.Enable(_instancedKeyword);
|
||||
reworkedScd.shaderKeywordSet = shaderKeywordSet;
|
||||
reworkedData.Add(reworkedScd);
|
||||
continue;
|
||||
}
|
||||
|
||||
if(shaderKeywordSet.IsEnabled(_instancedKeyword))
|
||||
{
|
||||
shaderKeywordSet.Enable(_singlePassKeyword);
|
||||
shaderKeywordSet.Disable(_instancedKeyword);
|
||||
reworkedScd.shaderKeywordSet = shaderKeywordSet;
|
||||
reworkedData.Add(reworkedScd);
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
||||
foreach(ShaderCompilerData entry in reworkedData)
|
||||
{
|
||||
data.Add(entry);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
3
Assets/ABI.CCK/Scripts/ShaderCompatibilityPreprocessor.cs.meta
Executable file
3
Assets/ABI.CCK/Scripts/ShaderCompatibilityPreprocessor.cs.meta
Executable file
|
@ -0,0 +1,3 @@
|
|||
fileFormatVersion: 2
|
||||
guid: cd41ee56005d4448ab4defe7fcfc47df
|
||||
timeCreated: 1653585028
|
3
Assets/ABI.CCK/Scripts/Translation.meta
Executable file
3
Assets/ABI.CCK/Scripts/Translation.meta
Executable file
|
@ -0,0 +1,3 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 79c2fab08d254ac79920e18ec122e553
|
||||
timeCreated: 1621175829
|
354
Assets/ABI.CCK/Scripts/Translation/Chinese.cs
Executable file
354
Assets/ABI.CCK/Scripts/Translation/Chinese.cs
Executable file
|
@ -0,0 +1,354 @@
|
|||
using System.Collections.Generic;
|
||||
|
||||
namespace ABI.CCK.Scripts.Translation
|
||||
{
|
||||
public class Chinese
|
||||
{
|
||||
public static readonly Dictionary<string, string> Localization = new Dictionary<string, string>()
|
||||
{
|
||||
{"ABI_UI_BUILDPANEL_HEADING_BUILDER", "内容构建"},
|
||||
{"ABI_UI_BUILDPANEL_HEADING_SETTINGS", "选项设置"},
|
||||
{"ABI_UI_BUILDPANEL_HEADING_DOCUMENTATION", "查看文档"},
|
||||
{"ABI_UI_BUILDPANEL_HEADING_FEEDBACK", "提交反馈"},
|
||||
{"ABI_UI_BUILDPANEL_HEADING_FOUNDCONTENT", "活动场景中的内容"},
|
||||
{"ABI_UI_BUILDPANEL_HEADING_ACCOUNT_INFO", "账号信息"},
|
||||
{"ABI_UI_BUILDPANEL_LOGIN_CREDENTIALS_INCORRECT", "提供的登录凭据不正确。"},
|
||||
{"ABI_UI_BUILDPANEL_LOGIN_BUTTON", "登录"},
|
||||
{"ABI_UI_BUILDPANEL_LOGOUT_BUTTON", "登出"},
|
||||
{"ABI_UI_BUILDPANEL_LOGOUT_DIALOG_TITLE", "移除CCK的本地登录凭据"},
|
||||
{
|
||||
"ABI_UI_BUILDPANEL_LOGOUT_DIALOG_BODY",
|
||||
"这将移除本地保存的凭据,你将会需要重新验证,确定继续吗?"
|
||||
},
|
||||
{"ABI_UI_BUILDPANEL_LOGOUT_DIALOG_ACCEPT", "是"},
|
||||
{"ABI_UI_BUILDPANEL_LOGOUT_DIALOG_DECLINE", "否"},
|
||||
|
||||
{"ABI_UI_BUILDPANEL_UPLOADER_NO_AVATARS_FOUND", "在场景中找不到已经配置的Avatar - 是否添加了CVRAvatar?"},
|
||||
{
|
||||
"ABI_UI_BUILDPANEL_UPLOADER_NO_SPAWNABLES_FOUND",
|
||||
"在场景中找不到已经配置的可生成的对象 - 是否添加了CVRSpawnable?"
|
||||
},
|
||||
{
|
||||
"ABI_UI_BUILDPANEL_WORLDS_WARNING_SPAWNPOINT",
|
||||
"你的世界没有指定任何出生点,请添加一个或者多个出生点在CVRWorld组件中,否则CVRWorld holder对象的位置将被使用。"
|
||||
},
|
||||
{
|
||||
"ABI_UI_BUILDPANEL_WORLDS_INFO_REFERENCE_CAMERA",
|
||||
"你的世界没有指定参考摄像机,默认的摄像机配置将被使用。"
|
||||
},
|
||||
{
|
||||
"ABI_UI_BUILDPANEL_WORLDS_INFO_RESPAWN_HEIGHT",
|
||||
"出生点高度低于-500,从地图上掉出要花很长时间才能重生,这可能不是你想要的。"
|
||||
},
|
||||
{
|
||||
"ABI_UI_BUILDPANEL_WORLDS_ERROR_MULTIPLE_CVR_WORLD",
|
||||
"场景中存在多个CVR世界对象。这将导致世界发生问题。请确保场景中仅有一个CVRWorld对象或使用我们的CVR世界预制体。"
|
||||
},
|
||||
{
|
||||
"ABI_UI_BUILDPANEL_WORLDS_ERROR_WORLD_CONTAINS_AVATAR",
|
||||
"被加载的场景不应该同时包含Avatar和世界描述符组件,请根据实际情况设置场景。"
|
||||
},
|
||||
{
|
||||
"ABI_UI_BUILDPANEL_WORLDS_ERROR_NO_CONTENT",
|
||||
"在当前场景中找不到任何内容,你是否忘了给游戏对象添加描述符对象?"
|
||||
},
|
||||
{
|
||||
"ABI_UI_BUILDPANEL_WORLDS_ERROR_UNITY_UNSUPPORTED",
|
||||
"你正在使用不受支持的unity版本。请使用受支持的unity版本,你可以在我们的文档中检查与你的CCK版本对应的支持版本。"
|
||||
},
|
||||
{"ABI_UI_BUILDPANEL_UPLOAD_WORLD_BUTTON", "上传世界"},
|
||||
{"ABI_UI_BUILDPANEL_UPLOAD_AVATAR_BUTTON", "上传Avatar"},
|
||||
{"ABI_UI_BUILDPANEL_UPLOAD_PROP_BUTTON", "上载可生成对象"},
|
||||
{"ABI_UI_BUILDPANEL_FIX_IMPORT_SETTINGS", "修复导入设置"},
|
||||
{"ABI_UI_BUILDPANEL_UTIL_REMOVE_MISSING_SCRIPTS_BUTTON", "删除所有丢失的脚本"},
|
||||
{"ABI_UI_BUILDPANEL_LOGIN_TEXT_USERNAME", "用户名"},
|
||||
{"ABI_UI_BUILDPANEL_LOGIN_TEXT_ACCESSKEY", "访问密钥"},
|
||||
{
|
||||
"ABI_UI_BUILDPANEL_INFOTEXT_DOCUMENTATION",
|
||||
"使用我们的文档了解有关如何创建游戏内容的更多信息,你还将找到一些关于如何使用多数的核心的引擎功能以及核心的游戏功能的方便教程。"
|
||||
},
|
||||
{"ABI_UI_BUILDPANEL_INFOTEXT_SIGNIN1", "请使用您的CCK凭据进行验证。"},
|
||||
{"ABI_UI_BUILDPANEL_INFOTEXT_SIGNIN2", "你可以在hub.abinteractive.net上找到它们。"},
|
||||
{"ABI_UI_BUILDPANEL_INFOTEXT_SIGNIN3", "请在密钥管理器中生成CCK密钥。"},
|
||||
{"ABI_UI_BUILDPANEL_INFOTEXT_AUTHENTICATED_AS", "身份验证为"},
|
||||
{"ABI_UI_BUILDPANEL_INFOTEXT_USER_RANK", "API用户等级"},
|
||||
{"ABI_UI_BUILDPANEL_SETTINGS_HEADER", "上传设置"},
|
||||
{"ABI_UI_BUILDPANEL_SETTINGS_CONTENT_ENCRYPTION", "切换网络连接加密:"},
|
||||
{
|
||||
"ABI_UI_BUILDPANEL_SETTINGS_HINT_CONTENT_ENCRYPTION",
|
||||
"如果上传遇到问题,请尝试切换到http。"
|
||||
},
|
||||
{"ABI_UI_BUILDPANEL_SETTINGS_CONTENT_REGION", "首选上传地域:"},
|
||||
{
|
||||
"ABI_UI_BUILDPANEL_SETTINGS_HINT_CONTENT_REGION",
|
||||
"你可以切换首选上传地域来提高上传速度。如果首选地域不可用,则将自动选择其它地域。你的内容在所有地域内都可用,与选择的用于上传的地域无关。"
|
||||
},
|
||||
{"ABI_UI_BUILDPANEL_SETTINGS_CCK_LANGUAGE", "CCK语言:"},
|
||||
{
|
||||
"ABI_UI_BUILDPANEL_SETTINGS_HINT_CCK_LANGUAGE",
|
||||
"你可以在这里切换CCK语言,以便用所倾向的语言来获取通知及UI文本。"
|
||||
},
|
||||
{
|
||||
"ABI_UI_BUILDPANEL_WARNING_FOLDERPATH",
|
||||
"请不要移动CCK或CCK Mods文件夹的位置,这将导致CCK无法使用。"
|
||||
},
|
||||
{
|
||||
"ABI_UI_BUILDPANEL_WARNING_FEEDBACK",
|
||||
"想要请求新功能吗?找到了BUG?请在我们的反馈平台提交!"
|
||||
},
|
||||
{"ABI_UI_BUILDPANEL_WARNING_MESH_FILTER_MESH_EMPTY", "检测到缺少网格的网格过滤器"},
|
||||
{
|
||||
"ABI_UI_BUILDPANEL_AVATAR_ERROR_ANIMATOR",
|
||||
"在这个Avatar上没有找到Animator,确保Animator和CVRAvatar组件在同一个游戏对象上。"
|
||||
},
|
||||
{
|
||||
"ABI_UI_BUILDPANEL_AVATAR_WARNING_GENERIC",
|
||||
"你的Avatar Animator上有没被填写的Avatar空位,你的Avatar将被视为普通Avatar。"
|
||||
},
|
||||
{
|
||||
"ABI_UI_BUILDPANEL_AVATAR_WARNING_POLYGONS",
|
||||
"警告:此Avatar包含超过100k ({X}) 个多边形,这可能导致游戏中出现性能问题,但不会阻止你上传。"
|
||||
},
|
||||
{
|
||||
"ABI_UI_BUILDPANEL_AVATAR_WARNING_SKINNED_MESH_RENDERERS",
|
||||
"警告:此Avatar包含超过10 ({X}) 个带蒙皮的网格渲染器组件,这可能导致游戏中出现性能问题,但不会阻止你上传。"
|
||||
},
|
||||
{
|
||||
"ABI_UI_BUILDPANEL_AVATAR_WARNING_MATERIALS",
|
||||
"警告:此Avatar使用了超过20 ({X}) 个材质空位,这可能导致游戏中出现性能问题,但不会阻止你上传。"
|
||||
},
|
||||
{
|
||||
"ABI_UI_BUILDPANEL_AVATAR_WARNING_VIEWPOINT",
|
||||
"警告:此Avatar的视角位置默认为X=0,Y=0,Z=0。这意味着你的视角在地面上,这可能不是你想要的。"
|
||||
},
|
||||
{"ABI_UI_BUILDPANEL_AVATAR_WARNING_NON_HUMANOID", "警告:你的Avatar没有设置为人形。"},
|
||||
{
|
||||
"ABI_UI_BUILDPANEL_AVATAR_WARNING_LEGACY_BLENDSHAPES",
|
||||
"警告:此Avatar没有传统的BlendShape法线,这将导致文件变大以及照明错误。"
|
||||
},
|
||||
{
|
||||
"ABI_UI_BUILDPANEL_AVATAR_INFO_POLYGONS",
|
||||
"信息:这个Avatar包含超过50k ({X}) 个多边形,这可能导致游戏中出现性能问题,但不会阻止你上传"
|
||||
},
|
||||
{
|
||||
"ABI_UI_BUILDPANEL_AVATAR_INFO_SKINNED_MESH_RENDERERS",
|
||||
"信息:此Avatar包含超过5 ({X}) 个带蒙皮的网格渲染器组件,这可能导致游戏中出现性能问题,但不会阻止你上传。"
|
||||
},
|
||||
{
|
||||
"ABI_UI_BUILDPANEL_AVATAR_INFO_MATERIALS",
|
||||
"信息:此Avatar使用了超过 10 ({X}) 个材质空位,这可能导致游戏中出现性能问题,但不会阻止你上传。"
|
||||
},
|
||||
{
|
||||
"ABI_UI_BUILDPANEL_AVATAR_INFO_SMALL",
|
||||
"信息:此Avatar的视角高度低于0.5,这个Avatar将被认定为极小。"
|
||||
},
|
||||
{
|
||||
"ABI_UI_BUILDPANEL_AVATAR_INFO_HUGE",
|
||||
"信息:此Avatar的视角高度高于3.0,这个Avatar将被认定为极大。"
|
||||
},
|
||||
{"ABI_UI_BUILDPANEL_AVATAR_UPLOAD_BUTTON", "上传Avatar"},
|
||||
{
|
||||
"ABI_UI_BUILDPANEL_PROPS_ERROR_MISSING_SCRIPT",
|
||||
"可生成的对象或其子对象包含丢失的脚本。上传会因此失败。在上传之前删除所有丢失的脚本引用,或者单击“删除所有丢失的脚本”自动完成此操作。"
|
||||
},
|
||||
{
|
||||
"ABI_UI_BUILDPANEL_PROPS_WARNING_POLYGONS",
|
||||
"警告:这个可生成的对象包含超过100k ({X}) 个多边形,这可能导致游戏中出现性能问题,但不会阻止你上传。"
|
||||
},
|
||||
{
|
||||
"ABI_UI_BUILDPANEL_PROPS_WARNING_SKINNED_MESH_RENDERERS",
|
||||
"警告:此可生成对象包含超过 10 ({X}) 个带蒙皮的网格渲染器组件,这可能导致游戏中出现性能问题,但不会阻止你上传。"
|
||||
},
|
||||
{
|
||||
"ABI_UI_BUILDPANEL_PROPS_WARNING_MATERIALS",
|
||||
"警告:此可生成对象使用了超过 20 ({X}) 个材质空位,这可能导致游戏中出现性能问题,但不会阻止你上传。"
|
||||
},
|
||||
{
|
||||
"ABI_UI_BUILDPANEL_PROPS_WARNING_LEGACY_BLENDSHAPES",
|
||||
"警告:此可生成对象没有传统的BlendShape法线,这将导致文件变大以及照明错误。"
|
||||
},
|
||||
{
|
||||
"ABI_UI_BUILDPANEL_PROPS_INFO_POLYGONS",
|
||||
"信息:此可生成对象包含超过 50k ({X}) 个多边形, 这可能导致游戏中出现性能问题,但不会阻止你上传。"
|
||||
},
|
||||
{
|
||||
"ABI_UI_BUILDPANEL_PROPS_INFO_SKINNED_MESH_RENDERERS",
|
||||
"信息:此可生成对象包含超过 5 ({X}) 个带蒙皮的网格渲染器组件,这可能导致游戏中出现性能问题,但不会阻止你上传。"
|
||||
},
|
||||
{
|
||||
"ABI_UI_BUILDPANEL_PROPS_INFO_MATERIALS",
|
||||
"信息:此可生成对象使用了超过 10 ({X}) 个材质空位,这可能导致游戏中出现性能问题,但不会阻止你上传。"
|
||||
},
|
||||
{"ABI_UI_BUILDPANEL_PROPS_UPLOAD_BUTTON", "上传可生成的物体 (Prop)"},
|
||||
{
|
||||
"ABI_UI_BUILDPANEL_ERROR_WORLD_MISSING_SCRIPTS",
|
||||
"场景包含丢失的脚本。上传会因此失败。在上传之前删除所有丢失的脚本引用,或者单击“删除所有丢失的脚本”自动完成此操作。"
|
||||
},
|
||||
{
|
||||
"ABI_UI_BUILDPANEL_ERROR_AVATAR_MISSING_SCRIPTS",
|
||||
"Avatar或其子对象包含丢失的脚本。上传会因此失败。在上传之前删除所有丢失的脚本引用,或者单击“删除所有丢失的脚本”自动完成此操作。"
|
||||
},
|
||||
{
|
||||
"ABI_UI_ADVAVTR_TRIGGER_MULTIPLE_TRIGGER_HELPBOX",
|
||||
"在同一个游戏对象上有多个触发器会导致不可预知的行为!"
|
||||
},
|
||||
{
|
||||
"ABI_UI_ADVAVTR_TRIGGER_ALLOWED_POINTERS_HELPBOX",
|
||||
"添加Pointers到\"允许的Pointers\" 列表将忽略其中不包含的所有其他Pointers"
|
||||
},
|
||||
{
|
||||
"ABI_UI_ADVAVTR_TRIGGER_ALLOWED_TYPES_HELPBOX",
|
||||
"添加类型到\"允许的类型\" 列表将忽略其中不包含的所有其他类型"
|
||||
},
|
||||
{
|
||||
"ABI_UI_ADVAVTR_TRIGGER_PARTICLE_HELPBOX",
|
||||
"启用此选项将允许在同一游戏对象上有pointer的粒子系统激活此触发器。粒子只能在输入触发器时触发。"
|
||||
},
|
||||
{
|
||||
"ABI_UI_INFOTEXT_WORLDS_NO_AVATARS",
|
||||
"在场景中发现一个ChilloutVR世界对象,在世界对象被移除之前,无法上传Avatars,Avatars / 可生成对象将是世界的一部分,并且在世界上可见,除非它们被禁用或移除。"
|
||||
},
|
||||
{
|
||||
"ABI_UI_ASSET_INFO_HEADER_INFORMATION",
|
||||
"此脚本用于存储对象元信息。请不要修改上面的数据,除非你知道你在做什么,要重新上传一个Avatar,请解绑Guid并重新上传。"
|
||||
},
|
||||
{"ABI_UI_ASSET_INFO_GUID_LABEL", "当前存储的Guid为: "},
|
||||
{"ABI_UI_ASSET_INFO_DETACH_BUTTON", "解绑asset唯一标识符"},
|
||||
{"ABI_UI_ASSET_INFO_DETACH_BUTTON_DIALOG_TITLE", "从Asset信息管理器中解绑Guid"},
|
||||
{
|
||||
"ABI_UI_ASSET_INFO_DETACH_BUTTON_DIALOG_BODY",
|
||||
"将解绑Asset唯一标识符,这意味着你内容很可能被运行时作为新内容上传,继续吗?"
|
||||
},
|
||||
{"ABI_UI_ASSET_INFO_DETACH_BUTTON_DIALOG_ACCEPT", "是"},
|
||||
{"ABI_UI_ASSET_INFO_DETACH_BUTTON_DIALOG_DENY", "否"},
|
||||
{"ABI_UI_ASSET_INFO_ATTACH_LABEL", "唯一标识符"},
|
||||
{
|
||||
"ABI_UI_ASSET_INFO_ATTACH_INFO",
|
||||
"如果你没有打算覆盖旧的上传内容,则不需要重新绑定Guid,当前没有绑定则会在上传时将生成一个。"
|
||||
},
|
||||
{"ABI_UI_ASSET_INFO_ATTACH_BUTTON", "重新绑定guid"},
|
||||
{
|
||||
"ABI_UI_AVATAR_INFO_VIEWPOINT",
|
||||
"控制玩家在游戏中视角相机绑定的位置,这个应该在你的两只眼睛之间。"
|
||||
},
|
||||
{
|
||||
"ABI_UI_AVATAR_INFO_VOICE_POSITION",
|
||||
"控制玩家在游戏中的声音绑定的位置。这个应该在你的嘴上。"
|
||||
},
|
||||
{
|
||||
"ABI_UI_AVATAR_INFO_OVERRIDE_CONTROLLER",
|
||||
"要使覆盖生效,请确保在覆盖控制器中指定了正确的animator,否则,将看不到要覆盖的animator空位,一个例子在CCK Player Prefabs文件夹中。"
|
||||
},
|
||||
{
|
||||
"ABI_UI_AVATAR_INFO_BLinking",
|
||||
"眨眼的形态键的使用是可选的,它可以在运行时生成随机眨眼。"
|
||||
},
|
||||
{
|
||||
"ABI_UI_AVATAR_INFO_EYE_MOVEMENT",
|
||||
"选中此选项将开启眼睛的半真实的动画。"
|
||||
},
|
||||
{
|
||||
"ABI_UI_AVATAR_INFO_EYE_VISEMES",
|
||||
"要使“自动选择发音嘴型”功能正常工作,必须首先选择包含face的网格。在大多数情况下,这将是body网格。"
|
||||
},
|
||||
{
|
||||
"ABI_UI_MODULE_WORKSHOP_MISSING_DEPENDENCIES_TITLE",
|
||||
"项目中缺少依赖项!"
|
||||
},
|
||||
{
|
||||
"ABI_UI_MODULE_WORKSHOP_MISSING_DEPENDENCIES_WARNING_PREFACE",
|
||||
"以下依赖项未满足"
|
||||
},
|
||||
{
|
||||
"ABI_UI_MODULE_WORKSHOP_MISSING_DEPENDENCIES_FINAL_WARNING",
|
||||
"请在安装此模块之前安装所有依赖项!"
|
||||
},
|
||||
{
|
||||
"ABI_UI_MODULE_WORKSHOP_MISSING_DEPENDENCIES_DIALOG_ACCEPT",
|
||||
"了解"
|
||||
},
|
||||
{ "ABI_UI_BUILD_RUNTIME_HEADER", "上传内容到ChilloutVR" },
|
||||
{ "ABI_UI_BUILD_RUNTIME_BTN_NEXT", "下一步" },
|
||||
{ "ABI_UI_BUILD_RUNTIME_BTN_PREV", "上一步" },
|
||||
{ "ABI_UI_BUILD_RUNTIME_BTN_NEW_PICTURE", "替换图像" },
|
||||
{ "ABI_UI_BUILD_RUNTIME_FILEINFO_ASSETBUNDLE", "资源包文件大小" },
|
||||
{ "ABI_UI_BUILD_RUNTIME_FILEINFO_IMAGE", "图片文件大小" },
|
||||
{ "ABI_UI_BUILD_RUNTIME_FILEINFO_MANIFEST", "清单文件大小" },
|
||||
{ "ABI_UI_BUILD_RUNTIME_FILEINFO_PANO1K", "1080P 全景文件大小" },
|
||||
{ "ABI_UI_BUILD_RUNTIME_FILEINFO_PANO4K", "4K 全景文件大小" },
|
||||
{ "ABI_UI_BUILD_RUNTIME_HINT_CLICK_TO_CAPTURE", "单击较小的图像来捕获缩略图" },
|
||||
{ "ABI_UI_BUILDSTEP_FILTERTAGS", "过滤标签" },
|
||||
{ "ABI_UI_BUILDSTEP_DETAILS", "详情" },
|
||||
{ "ABI_UI_BUILDSTEP_LEGAL", "法律保证" },
|
||||
{ "ABI_UI_BUILDSTEP_UPLOAD", "上传内容" },
|
||||
{ "ABI_UI_BUILDSTEP_DETAILS_NAME_ROW", "名称:" },
|
||||
{ "ABI_UI_BUILDSTEP_DETAILS_DESC_ROW", "描述:" },
|
||||
{ "ABI_UI_BUILDSTEP_DETAILS_NAME_PLACEHOLDER", "对象名称(必填!)" },
|
||||
{ "ABI_UI_BUILDSTEP_DETAILS_DESC_PLACEHOLDER", "对象描述" },
|
||||
{ "ABI_UI_BUILDSTEP_DETAILS_CHANGELOG_PLACEHOLDER", "对象更改日志 - 告诉用户你更改或添加了什么" },
|
||||
{
|
||||
"ABI_UI_BUILDSTEP_DETAILS_WARNING_NEW_OBJECT",
|
||||
"这个对象是第一次上传。必须上传资料图片,因此,不上传任何图像的选项不可用。"
|
||||
},
|
||||
{
|
||||
"ABI_UI_BUILDSTEP_DETAILS_WARNING_UPDATING_OBJECT",
|
||||
"你将要更新此对象。更新此对象时无法更改描述或名称。如果需要,请在hub上进行更改。"
|
||||
},
|
||||
{
|
||||
"ABI_UI_BUILDSTEP_DETAILS_SET_ACTIVE_FILE",
|
||||
"将此次上传设置为目标平台的活动文件"
|
||||
},
|
||||
{
|
||||
"ABI_UI_BUILDSTEP_DETAILS_LEGAL_PERMISSION",
|
||||
"本人承诺,我上传的内容属于我或已获得许可。我知道未经作者许可上传受版权保护的内容可能会导致我的帐户被限制,并且/或者产生法律后果。我知道我必须完全遵守Alpha Blend Interactive服务条款中提及的任何和所有内容创建规定。"
|
||||
},
|
||||
{
|
||||
"ABI_UI_BUILDSTEP_DETAILS_LEGAL_TAGS",
|
||||
"本人承诺,所有标签设置正确,符合上传的内容。我知道故意设置错误的标签是严重的违规行为。我知道如果我连续不断地设置错误的标签将导致帐户受到惩罚。"
|
||||
},
|
||||
{
|
||||
"ABI_UI_BUILDSTEP_UPLOAD_STEP_DETAILS",
|
||||
"你的内容正在上传到我们的网络。上传过程分为几个步骤。文件上传到我们的网络后,该文件将自动进行安全检查,通过检查后,我们将加密你的资源包并推送到我们的CDN。你可以在下面检查当前的上传状态。"
|
||||
},
|
||||
{
|
||||
"ABI_UI_BUILDSTEP_UPLOAD_DETAILS_MISSING",
|
||||
"要将内容上传到我们的平台,需要一个名称。上传新对象时,请确保对它进行相应的命名。你将返回到详情页来输入一个名字。"
|
||||
},
|
||||
{
|
||||
"ABI_UI_BUILDSTEP_UPLOAD_LEGAL_MISSING",
|
||||
"要将内容上传到我们的平台,你必须证明你已被允许上传上述内容,并且设置的所有标签都是正确的。你将返回到法律信息页面查看并同意法律保证。"
|
||||
},
|
||||
{ "ABI_UI_DETAILS_HEAD_CHANGELOG", "内容更改日志" },
|
||||
{ "ABI_UI_DETAILS_HEAD_STATISTICS", "文件统计" },
|
||||
{ "ABI_UI_LEGAL_HEAD_OWNERSHIP", "法律保证:所有权和版权" },
|
||||
{ "ABI_UI_LEGAL_HEAD_TAGS", "法律保证:标签" },
|
||||
{ "ABI_UI_TAGS_HEADER_AUDIO", "听觉体验" },
|
||||
{ "ABI_UI_TAGS_HEADER_VISUAL", "视觉体验" },
|
||||
{ "ABI_UI_TAGS_HEADER_CONTENT", "内容" },
|
||||
{ "ABI_UI_TAGS_HEADER_NSFW", "年龄分级" },
|
||||
{ "ABI_UI_TAGS_LOUD_AUDIO", "大音量音频" },
|
||||
{ "ABI_UI_TAGS_LR_AUDIO", "广范围音频" },
|
||||
{ "ABI_UI_TAGS_SPAWN_AUDIO", "生成时的音频" },
|
||||
{ "ABI_UI_TAGS_CONTAINS_MUSIC", "包含音乐" },
|
||||
{ "ABI_UI_TAGS_FLASHING_COLORS", "闪烁的颜色" },
|
||||
{ "ABI_UI_TAGS_FLASHING_LIGHTS", "闪烁的灯光" },
|
||||
{ "ABI_UI_TAGS_EXTREMELY_BRIGHT", "亮度极高" },
|
||||
{ "ABI_UI_TAGS_SCREEN_EFFECTS", "屏幕特效" },
|
||||
{ "ABI_UI_TAGS_PARTICLE_SYSTEMS", "粒子系统" },
|
||||
{ "ABI_UI_TAGS_VIOLENCE", "暴力" },
|
||||
{ "ABI_UI_TAGS_GORE", "血腥" },
|
||||
{ "ABI_UI_TAGS_HORROR", "恐怖" },
|
||||
{ "ABI_UI_TAGS_JUMPSCARE", "突发惊吓" },
|
||||
{ "ABI_UI_TAGS_HUGE", "巨大" },
|
||||
{ "ABI_UI_TAGS_SMALL", "微小" },
|
||||
{ "ABI_UI_TAGS_SUGGESTIVE", "暗示性" },
|
||||
{ "ABI_UI_TAGS_NUDITY", "裸露" },
|
||||
{ "ABI_UI_API_RESPONSE_HEAD", "当前状态" },
|
||||
{ "ABI_UI_API_RESPONSES_UPLOADED", "文件已上传。现在正在处理文件。" },
|
||||
{ "ABI_UI_API_RESPONSES_SECURITY_CHECKING", "我们的安全系统目前正在检查资源包。" },
|
||||
{ "ABI_UI_API_RESPONSES_ENCRYPTING", "你的资源包正在被加密。" },
|
||||
{ "ABI_UI_API_RESPONSES_PUSHING", "检查完毕。该文件当前正在被传输到我们的存储。" },
|
||||
{ "ABI_UI_API_RESPONSES_FINISHED", "上传完毕。你的内容现在在游戏中可用了。" },
|
||||
};
|
||||
}
|
||||
}
|
3
Assets/ABI.CCK/Scripts/Translation/Chinese.cs.meta
Executable file
3
Assets/ABI.CCK/Scripts/Translation/Chinese.cs.meta
Executable file
|
@ -0,0 +1,3 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 4f9a6bc2385f4ddfa59896efe18e7576
|
||||
timeCreated: 1637941174
|
354
Assets/ABI.CCK/Scripts/Translation/Dutch.cs
Executable file
354
Assets/ABI.CCK/Scripts/Translation/Dutch.cs
Executable file
|
@ -0,0 +1,354 @@
|
|||
using System.Collections.Generic;
|
||||
|
||||
namespace ABI.CCK.Scripts.Translation
|
||||
{
|
||||
public class Dutch
|
||||
{
|
||||
public static readonly Dictionary<string, string> Localization = new Dictionary<string, string>()
|
||||
{
|
||||
{"ABI_UI_BUILDPANEL_HEADING_BUILDER", "Content Bouwer"},
|
||||
{"ABI_UI_BUILDPANEL_HEADING_SETTINGS", "Instellingen en Opties"},
|
||||
{"ABI_UI_BUILDPANEL_HEADING_DOCUMENTATION", "Bekijk onze documentatie"},
|
||||
{"ABI_UI_BUILDPANEL_HEADING_FEEDBACK", "Stuur Feedback"},
|
||||
{"ABI_UI_BUILDPANEL_HEADING_FOUNDCONTENT", "Gevonden Content in Actieve Scene"},
|
||||
{"ABI_UI_BUILDPANEL_HEADING_ACCOUNT_INFO", "Account Informatie"},
|
||||
{"ABI_UI_BUILDPANEL_LOGIN_CREDENTIALS_INCORRECT", "De opgegeven inloggegevens zijn onjuist."},
|
||||
{"ABI_UI_BUILDPANEL_LOGIN_BUTTON", "Inloggen"},
|
||||
{"ABI_UI_BUILDPANEL_LOGOUT_BUTTON", "Uitloggen"},
|
||||
{"ABI_UI_BUILDPANEL_LOGOUT_DIALOG_TITLE", "Lokale inloggegevens voor CCK verwijderen"},
|
||||
{
|
||||
"ABI_UI_BUILDPANEL_LOGOUT_DIALOG_BODY",
|
||||
"Hiermee worden de lokaal opgeslagen referenties verwijderd. U zult zich opnieuw moeten verifiëren. Wil je doorgaan?"
|
||||
},
|
||||
{"ABI_UI_BUILDPANEL_LOGOUT_DIALOG_ACCEPT", "Ja!"},
|
||||
{"ABI_UI_BUILDPANEL_LOGOUT_DIALOG_DECLINE", "Nee!"},
|
||||
|
||||
{"ABI_UI_BUILDPANEL_UPLOADER_NO_AVATARS_FOUND", "Geen geconfigureerde avatars gevonden in scène - CVRAvatar component toegevoegd?"},
|
||||
{
|
||||
"ABI_UI_BUILDPANEL_UPLOADER_NO_SPAWNABLES_FOUND",
|
||||
"Geen geconfigureerde spawnbare objecten gevonden in scene - CVRSpawnable component toegevoegd?"
|
||||
},
|
||||
{
|
||||
"ABI_UI_BUILDPANEL_WORLDS_WARNING_SPAWNPOINT",
|
||||
"Je wereld heeft geen spawn-posities toegewezen. Voeg een of meerdere spawn posities toe in de CVRWorld-component, anders wordt de locatie van het standaard CVRWorld gebruikt."
|
||||
},
|
||||
{
|
||||
"ABI_UI_BUILDPANEL_WORLDS_INFO_REFERENCE_CAMERA",
|
||||
"Je hebt geen referentiecamera toegewezen aan je wereld. Standaard camera-instellingen worden gebruikt."
|
||||
},
|
||||
{
|
||||
"ABI_UI_BUILDPANEL_WORLDS_INFO_RESPAWN_HEIGHT",
|
||||
"De respawn-hoogte is minder dan -500. Het duurt lang om te respawnen als je uit de map valt. Dit is waarschijnlijk niet wat je wilt."
|
||||
},
|
||||
{
|
||||
"ABI_UI_BUILDPANEL_WORLDS_ERROR_MULTIPLE_CVR_WORLD",
|
||||
"Er zijn meerdere CVR World-objecten in de scène aanwezig. Dit zal de map breken. Zorg ervoor dat er slechts één CVR World-object in de scène is of gebruik onze prefab CVRWorld."
|
||||
},
|
||||
{
|
||||
"ABI_UI_BUILDPANEL_WORLDS_ERROR_WORLD_CONTAINS_AVATAR",
|
||||
"Geladen scènes mogen nooit zowel avatar- als werelddescriptorobjecten bevatten. Stel uw scènes dienovereenkomstig in."
|
||||
},
|
||||
{
|
||||
"ABI_UI_BUILDPANEL_WORLDS_ERROR_NO_CONTENT",
|
||||
"Geen inhoud gevonden in huidige scène. Ben je vergeten een descriptorcomponent toe te voegen aan een game-object?"
|
||||
},
|
||||
{
|
||||
"ABI_UI_BUILDPANEL_WORLDS_ERROR_UNITY_UNSUPPORTED",
|
||||
"U gebruikt een unity-versie die niet wordt ondersteund. Gebruik een ondersteunde unity-versie. U kunt de ondersteunde versie controleren die overeenkomt met uw CCK-versie in onze documentatie."
|
||||
},
|
||||
{"ABI_UI_BUILDPANEL_UPLOAD_WORLD_BUTTON", "Upload Wereld"},
|
||||
{"ABI_UI_BUILDPANEL_UPLOAD_AVATAR_BUTTON", "Upload Avatar"},
|
||||
{"ABI_UI_BUILDPANEL_UPLOAD_PROP_BUTTON", "Upload Spawnbaar Object"},
|
||||
{"ABI_UI_BUILDPANEL_FIX_IMPORT_SETTINGS", "Importinstellingen herstellen"},
|
||||
{"ABI_UI_BUILDPANEL_UTIL_REMOVE_MISSING_SCRIPTS_BUTTON", "Verwijder ontbrekende scripts"},
|
||||
{"ABI_UI_BUILDPANEL_LOGIN_TEXT_USERNAME", "Gebruikersnaam"},
|
||||
{"ABI_UI_BUILDPANEL_LOGIN_TEXT_ACCESSKEY", "Toegangssleutel"},
|
||||
{
|
||||
"ABI_UI_BUILDPANEL_INFOTEXT_DOCUMENTATION",
|
||||
"Gebruik onze documentatie om meer te weten te komen over het maken van content voor onze games. Je vindt daar ook enkele handige tutorials over hoe je de meeste core engine-functies en core game-functies kunt gebruiken."
|
||||
},
|
||||
{"ABI_UI_BUILDPANEL_INFOTEXT_SIGNIN1", "Verifieer alstublieft met uw CCK-inloggegevens."},
|
||||
{"ABI_UI_BUILDPANEL_INFOTEXT_SIGNIN2", "Die vind je op hub.abinteractive.net."},
|
||||
{"ABI_UI_BUILDPANEL_INFOTEXT_SIGNIN3", "Genereer een CCK-sleutel in de sleutelbeheerder."},
|
||||
{"ABI_UI_BUILDPANEL_INFOTEXT_AUTHENTICATED_AS", "Geauthenticeerd als"},
|
||||
{"ABI_UI_BUILDPANEL_INFOTEXT_USER_RANK", "API-gebruikersrang"},
|
||||
{"ABI_UI_BUILDPANEL_SETTINGS_HEADER", "Instellingen uploaden"},
|
||||
{"ABI_UI_BUILDPANEL_SETTINGS_CONTENT_ENCRYPTION", "Kies Encryptie Verbinding:"},
|
||||
{
|
||||
"ABI_UI_BUILDPANEL_SETTINGS_HINT_CONTENT_ENCRYPTION",
|
||||
"Als je problemen hebt met uploaden, probeer dan over te schakelen naar http."
|
||||
},
|
||||
{"ABI_UI_BUILDPANEL_SETTINGS_CONTENT_REGION", "Gewenste uploadregio:"},
|
||||
{
|
||||
"ABI_UI_BUILDPANEL_SETTINGS_HINT_CONTENT_REGION",
|
||||
"U kunt de gewenste uploadregio wijzigen om uw uploadsnelheid te verhogen. Als de voorkeursregio niet beschikbaar is, wordt automatisch een andere regio geselecteerd. Uw inhoud is overal beschikbaar, ongeacht de regio die is gekozen om te uploaden."
|
||||
},
|
||||
{"ABI_UI_BUILDPANEL_SETTINGS_CCK_LANGUAGE", "CCK Language:"},
|
||||
{
|
||||
"ABI_UI_BUILDPANEL_SETTINGS_HINT_CCK_LANGUAGE",
|
||||
"U kunt hier uw CCK-taal wijzigen om meldingen en UI-teksten in uw voorkeurstaal te ontvangen."
|
||||
},
|
||||
{
|
||||
"ABI_UI_BUILDPANEL_WARNING_FOLDERPATH",
|
||||
"Verplaats de maplocatie van de CCK- of CCK Mods-map niet. Hierdoor wordt de CCK onbruikbaar."
|
||||
},
|
||||
{
|
||||
"ABI_UI_BUILDPANEL_WARNING_FEEDBACK",
|
||||
"Functie aanvragen? Een fout gevonden? Post op ons feedbackplatform!"
|
||||
},
|
||||
{"ABI_UI_BUILDPANEL_WARNING_MESH_FILTER_MESH_EMPTY", "MeshFilter with missing Mesh detected"},
|
||||
{
|
||||
"ABI_UI_BUILDPANEL_AVATAR_ERROR_ANIMATOR",
|
||||
"Er is geen animator gevonden voor deze avatar. Zorg ervoor dat er een animator aanwezig is op hetzelfde GameObject als de CVRAvatar-component."
|
||||
},
|
||||
{
|
||||
"ABI_UI_BUILDPANEL_AVATAR_WARNING_GENERIC",
|
||||
"Het Avatar Slot in uw Avatar Animator is niet gevuld. Uw Avatar wordt beschouwd als een algemene Avatar."
|
||||
},
|
||||
{
|
||||
"ABI_UI_BUILDPANEL_AVATAR_WARNING_POLYGONS",
|
||||
"Waarschuwing: deze avatar heeft in totaal meer dan 100.000 ({X}) polygonen. Dit kan prestatieproblemen veroorzaken in het spel. Dit weerhoudt je er niet van om te uploaden."
|
||||
},
|
||||
{
|
||||
"ABI_UI_BUILDPANEL_AVATAR_WARNING_SKINNED_MESH_RENDERERS",
|
||||
"Waarschuwing: deze avatar bevat meer dan 10 ({X}) SkinnedMeshRenderer-componenten. Dit kan prestatieproblemen veroorzaken in het spel. Dit weerhoudt je er niet van om te uploaden."
|
||||
},
|
||||
{
|
||||
"ABI_UI_BUILDPANEL_AVATAR_WARNING_MATERIALS",
|
||||
"Waarschuwing: deze avatar gebruikt meer dan 20 ({X}) materiële slots. Dit kan prestatieproblemen veroorzaken in het spel. Dit belet je niet om te uploaden."
|
||||
},
|
||||
{
|
||||
"ABI_UI_BUILDPANEL_AVATAR_WARNING_VIEWPOINT",
|
||||
"Waarschuwing: de weergavepositie van deze avatar is standaard X=0,Y=0,Z=0. Dit betekent dat uw kijkpositie op de grond is. Dit is waarschijnlijk niet wat je wilt."
|
||||
},
|
||||
{"ABI_UI_BUILDPANEL_AVATAR_WARNING_NON_HUMANOID", "Waarschuwing: je avatar is niet ingesteld als Humanoid."},
|
||||
{
|
||||
"ABI_UI_BUILDPANEL_AVATAR_WARNING_LEGACY_BLENDSHAPES",
|
||||
"Waarschuwing: deze avatar heeft geen legacy-blendshape normals Dit zal leiden tot een grotere bestandsgrootte en verlichtingsfouten"
|
||||
},
|
||||
{
|
||||
"ABI_UI_BUILDPANEL_AVATAR_INFO_POLYGONS",
|
||||
"Info: deze avatar heeft in totaal meer dan 50.000 ({X}) polygonen. Dit kan prestatieproblemen veroorzaken in het spel. Dit weerhoudt je er niet van om te uploaden."
|
||||
},
|
||||
{
|
||||
"ABI_UI_BUILDPANEL_AVATAR_INFO_SKINNED_MESH_RENDERERS",
|
||||
"Info: deze avatar bevat meer dan 5 ({X}) SkinnedMeshRenderer-componenten. Dit kan prestatieproblemen veroorzaken in het spel. Dit weerhoudt je er niet van om te uploaden."
|
||||
},
|
||||
{
|
||||
"ABI_UI_BUILDPANEL_AVATAR_INFO_MATERIALS",
|
||||
"Info: deze avatar gebruikt meer dan 10 ({X}) materiële slots. Dit kan prestatieproblemen veroorzaken in het spel. Dit weerhoudt je er niet van om te uploaden."
|
||||
},
|
||||
{
|
||||
"ABI_UI_BUILDPANEL_AVATAR_INFO_SMALL",
|
||||
"Info: de weergavepositie van deze avatar is minder dan 0,5 in hoogte. Deze avatar wordt als te klein beschouwd."
|
||||
},
|
||||
{
|
||||
"ABI_UI_BUILDPANEL_AVATAR_INFO_HUGE",
|
||||
"Info: de kijkpositie van deze avatar is meer dan 3,0 hoog. Deze avatar wordt als extreem groot beschouwd."
|
||||
},
|
||||
{"ABI_UI_BUILDPANEL_AVATAR_UPLOAD_BUTTON", "Upload Avatar"},
|
||||
{
|
||||
"ABI_UI_BUILDPANEL_PROPS_ERROR_MISSING_SCRIPT",
|
||||
"Spawnable Objects of de onderliggende items bevatten ontbrekende scripts. Het uploaden zal zo mislukken. Verwijder alle ontbrekende scriptreferenties voordat u uploadt of klik op Alle ontbrekende scripts verwijderen om dit automatisch voor u te laten doen."
|
||||
},
|
||||
{
|
||||
"ABI_UI_BUILDPANEL_PROPS_WARNING_POLYGONS",
|
||||
"Waarschuwing: dit spawnbare object heeft in totaal meer dan 100k ({X}) polygonen. Dit kan prestatieproblemen veroorzaken in het spel. Dit weerhoudt je er niet van om te uploaden."
|
||||
},
|
||||
{
|
||||
"ABI_UI_BUILDPANEL_PROPS_WARNING_SKINNED_MESH_RENDERERS",
|
||||
"Waarschuwing: dit spawnbare object bevat meer dan 10 ({X}) SkinnedMeshRenderer-componenten. Dit kan prestatieproblemen veroorzaken in het spel. Dit weerhoudt je er niet van om te uploaden."
|
||||
},
|
||||
{
|
||||
"ABI_UI_BUILDPANEL_PROPS_WARNING_MATERIALS",
|
||||
"Waarschuwing: dit spawnbare object gebruikt meer dan 20 ({X}) materiaalvakken. Dit kan prestatieproblemen veroorzaken in het spel. Dit weerhoudt je er niet van om te uploaden."
|
||||
},
|
||||
{
|
||||
"ABI_UI_BUILDPANEL_PROPS_WARNING_LEGACY_BLENDSHAPES",
|
||||
"Waarschuwing: dit spawnbare object heeft geen legacy normals. Dit zal leiden tot een grotere bestandsgrootte en verlichtingsfouten"
|
||||
},
|
||||
{
|
||||
"ABI_UI_BUILDPANEL_PROPS_INFO_POLYGONS",
|
||||
"Info: dit spawnbare object heeft in totaal meer dan 50k ({X}) polygonen. Dit kan prestatieproblemen veroorzaken in het spel. Dit weerhoudt je er niet van om te uploaden."
|
||||
},
|
||||
{
|
||||
"ABI_UI_BUILDPANEL_PROPS_INFO_SKINNED_MESH_RENDERERS",
|
||||
"Info: dit spawnbare object bevat meer dan 5 ({X}) SkinnedMeshRenderer-componenten. Dit kan prestatieproblemen veroorzaken in het spel. Dit weerhoudt je er niet van om te uploaden."
|
||||
},
|
||||
{
|
||||
"ABI_UI_BUILDPANEL_PROPS_INFO_MATERIALS",
|
||||
"Info: dit spawnbare object gebruikt meer dan 10 ({X}) materiaalvakken. Dit kan prestatieproblemen veroorzaken in het spel. Dit weerhoudt je er niet van om te uploaden."
|
||||
},
|
||||
{"ABI_UI_BUILDPANEL_PROPS_UPLOAD_BUTTON", "Upload Spawnable Object (Prop)"},
|
||||
{
|
||||
"ABI_UI_BUILDPANEL_ERROR_WORLD_MISSING_SCRIPTS",
|
||||
"Scène bevat ontbrekende scripts. Het uploaden zal zo mislukken. Verwijder alle ontbrekende scriptreferenties voordat u uploadt of klik op Verwijder ontbrekende scripts om dit automatisch voor u te laten doen."
|
||||
},
|
||||
{
|
||||
"ABI_UI_BUILDPANEL_ERROR_AVATAR_MISSING_SCRIPTS",
|
||||
"Avatar of de sub-objecten bevatten ontbrekende scripts. Het uploaden zal zo mislukken. Verwijder alle ontbrekende scriptreferenties voordat u uploadt of klik op Verwijder ontbrekende scripts om dit automatisch voor u te laten doen."
|
||||
},
|
||||
{
|
||||
"ABI_UI_ADVAVTR_TRIGGER_MULTIPLE_TRIGGER_HELPBOX",
|
||||
"Het hebben van meerdere triggers op hetzelfde GameObject leidt tot onvoorspelbaar gedrag!"
|
||||
},
|
||||
{
|
||||
"ABI_UI_ADVAVTR_TRIGGER_ALLOWED_POINTERS_HELPBOX",
|
||||
"Pointers toevoegen aan de lijst \"Toegestane Pointers\" negeert alle andere Pointers die er niet in staan."
|
||||
},
|
||||
{
|
||||
"ABI_UI_ADVAVTR_TRIGGER_ALLOWED_TYPES_HELPBOX",
|
||||
"Door typen toe te voegen aan de lijst \"Toegestane typen\" worden alle verwijzingen genegeerd die niet overeenkomen met de typen in de lijst."
|
||||
},
|
||||
{
|
||||
"ABI_UI_ADVAVTR_TRIGGER_PARTICLE_HELPBOX",
|
||||
"Als u deze optie inschakelt, kunnen particles die een pointer op hetzelfde GameObject hebben, deze trigger activeren. Particle kan alleen On Enter Trigger activeren."
|
||||
},
|
||||
{
|
||||
"ABI_UI_INFOTEXT_WORLDS_NO_AVATARS",
|
||||
"Er is een ChilloutVR World-object gevonden in de scène. Avatars kunnen pas worden geüpload als het wereldobject is verwijderd. Avatars / spawnbare objecten zullen deel uitmaken van de wereld en zichtbaar zijn in de wereld, tenzij ze worden uitgeschakeld of verwijderd."
|
||||
},
|
||||
{
|
||||
"ABI_UI_ASSET_INFO_HEADER_INFORMATION",
|
||||
"Dit script wordt gebruikt om metadata van objecten op te slaan. Wijzig de gegevens erop niet, tenzij u weet wat u doet. Om een avatar opnieuw te uploaden, koppelt u de guid los en uploadt u hem opnieuw."
|
||||
},
|
||||
{"ABI_UI_ASSET_INFO_GUID_LABEL", "De momenteel opgeslagen guid is: "},
|
||||
{"ABI_UI_ASSET_INFO_DETACH_BUTTON", "Unieke ID (Guid) loskoppelen"},
|
||||
{"ABI_UI_ASSET_INFO_DETACH_BUTTON_DIALOG_TITLE", "Guid loskoppelen van Asset Info Manager"},
|
||||
{
|
||||
"ABI_UI_ASSET_INFO_DETACH_BUTTON_DIALOG_BODY",
|
||||
"De unieke ID van het item wordt losgekoppeld. Dit betekent dat uw inhoud hoogstwaarschijnlijk als nieuw wordt geüpload tijdens runtime. Doorgaan?"
|
||||
},
|
||||
{"ABI_UI_ASSET_INFO_DETACH_BUTTON_DIALOG_ACCEPT", "Ja!"},
|
||||
{"ABI_UI_ASSET_INFO_DETACH_BUTTON_DIALOG_DENY", "Nee!"},
|
||||
{"ABI_UI_ASSET_INFO_ATTACH_LABEL", "Unieke identificatie"},
|
||||
{
|
||||
"ABI_UI_ASSET_INFO_ATTACH_INFO",
|
||||
"U hoeft een Guid niet opnieuw toe te voegen als u niet van plan bent een oude upload te overschrijven. Een nieuwe wordt gegenereerd bij het uploaden als er geen is bijgevoegd."
|
||||
},
|
||||
{"ABI_UI_ASSET_INFO_ATTACH_BUTTON", "Re-Attach guid"},
|
||||
{
|
||||
"ABI_UI_AVATAR_INFO_VIEWPOINT",
|
||||
"Regelt de camerapositie van je speler in het spel. Dit moet tussen beide ogen geplaatst worden."
|
||||
},
|
||||
{
|
||||
"ABI_UI_AVATAR_INFO_VOICE_POSITION",
|
||||
"Regelt de stempositie van uw speler in het spel. Dit zou op je mond geplaatst moeten worden."
|
||||
},
|
||||
{
|
||||
"ABI_UI_AVATAR_INFO_OVERRIDE_CONTROLLER",
|
||||
"Om ervoor te zorgen dat de overrides werken, moet u ervoor zorgen dat de juiste animator is toegewezen in de override-controller. Anders ziet u geen animator-slots. Een voorbeeld hiervan staat in de map CCK Player Prefabs."
|
||||
},
|
||||
{
|
||||
"ABI_UI_AVATAR_INFO_BLinking",
|
||||
"Het gebruik van een knipperende ogen (blendshape) is optioneel. Het kan worden ingeschakeld om willekeurige knipperingen te genereren tijdens upload/runtime."
|
||||
},
|
||||
{
|
||||
"ABI_UI_AVATAR_INFO_EYE_MOVEMENT",
|
||||
"Als u deze optie aanvinkt, wordt een semi-realistische animatie van de ogen gegenereerd."
|
||||
},
|
||||
{
|
||||
"ABI_UI_AVATAR_INFO_EYE_VISEMES",
|
||||
"Om de functie voor automatisch selecteren van visemes te laten werken, moet u eerst de mesh selecteren die het gezicht bevat. Dit zal in de meeste gevallen de body mesh zijn."
|
||||
},
|
||||
{
|
||||
"ABI_UI_MODULE_WORKSHOP_MISSING_DEPENDENCIES_TITLE",
|
||||
"Afhankelijkheden ontbreken in dit project!"
|
||||
},
|
||||
{
|
||||
"ABI_UI_MODULE_WORKSHOP_MISSING_DEPENDENCIES_WARNING_PREFACE",
|
||||
"Er wordt niet aan de volgende afhankelijkheden voldaan"
|
||||
},
|
||||
{
|
||||
"ABI_UI_MODULE_WORKSHOP_MISSING_DEPENDENCIES_FINAL_WARNING",
|
||||
"De volgende afhankelijkheden ontbreken, Installeer alle afhankelijkheden voordat u deze module installeert! Er wordt niet voldaan"
|
||||
},
|
||||
{
|
||||
"ABI_UI_MODULE_WORKSHOP_MISSING_DEPENDENCIES_DIALOG_ACCEPT",
|
||||
"Begrepen"
|
||||
},
|
||||
{ "ABI_UI_BUILD_RUNTIME_HEADER", "Inhoud uploaden naar ChilloutVR" },
|
||||
{ "ABI_UI_BUILD_RUNTIME_BTN_NEXT", "Ga verder naar de volgende stap" },
|
||||
{ "ABI_UI_BUILD_RUNTIME_BTN_PREV", "Terug naar laatste stap" },
|
||||
{ "ABI_UI_BUILD_RUNTIME_BTN_NEW_PICTURE", "Afbeelding vervangen" },
|
||||
{ "ABI_UI_BUILD_RUNTIME_FILEINFO_ASSETBUNDLE", "AssetBundle Bestandsgrootte" },
|
||||
{ "ABI_UI_BUILD_RUNTIME_FILEINFO_IMAGE", "Grootte afbeeldingsbestand" },
|
||||
{ "ABI_UI_BUILD_RUNTIME_FILEINFO_MANIFEST", "Manifest bestandsgrootte" },
|
||||
{ "ABI_UI_BUILD_RUNTIME_FILEINFO_PANO1K", "1080P Pano-bestandsgrootte" },
|
||||
{ "ABI_UI_BUILD_RUNTIME_FILEINFO_PANO4K", "4K Pano-bestandsgrootte" },
|
||||
{ "ABI_UI_BUILD_RUNTIME_HINT_CLICK_TO_CAPTURE", "Klik op de kleinere afbeelding om de foto vast te leggen" },
|
||||
{ "ABI_UI_BUILDSTEP_FILTERTAGS", "Tags filteren" },
|
||||
{ "ABI_UI_BUILDSTEP_DETAILS", "Details" },
|
||||
{ "ABI_UI_BUILDSTEP_LEGAL", "Juridische zekerheid" },
|
||||
{ "ABI_UI_BUILDSTEP_UPLOAD", "Inhoud uploaden" },
|
||||
{ "ABI_UI_BUILDSTEP_DETAILS_NAME_ROW", "Naam:" },
|
||||
{ "ABI_UI_BUILDSTEP_DETAILS_DESC_ROW", "Beschrijving:" },
|
||||
{ "ABI_UI_BUILDSTEP_DETAILS_NAME_PLACEHOLDER", "Objectnaam (verplicht!)" },
|
||||
{ "ABI_UI_BUILDSTEP_DETAILS_DESC_PLACEHOLDER", "Objectbeschrijving" },
|
||||
{ "ABI_UI_BUILDSTEP_DETAILS_CHANGELOG_PLACEHOLDER", "Object changelog - vertel gebruikers wat u hebt gewijzigd of toegevoegd" },
|
||||
{
|
||||
"ABI_UI_BUILDSTEP_DETAILS_WARNING_NEW_OBJECT",
|
||||
"Dit object wordt voor de eerste keer geüpload. Het uploaden van een profielfoto is vereist, daarom is de optie om geen afbeelding te uploaden niet beschikbaar."
|
||||
},
|
||||
{
|
||||
"ABI_UI_BUILDSTEP_DETAILS_WARNING_UPDATING_OBJECT",
|
||||
"U staat op het punt dit object bij te werken. Het wijzigen van de beschrijving of naam is niet beschikbaar tijdens het bijwerken van dit object. Wijzig deze indien nodig op de hub."
|
||||
},
|
||||
{
|
||||
"ABI_UI_BUILDSTEP_DETAILS_SET_ACTIVE_FILE",
|
||||
"Stel deze upload in als het actieve bestand voor het doelplatform"
|
||||
},
|
||||
{
|
||||
"ABI_UI_BUILDSTEP_DETAILS_LEGAL_PERMISSION",
|
||||
"Hierbij verklaar ik dat mijn geüploade inhoud toebehoort aan of in licentie is gegeven aan mij. Ik weet dat het uploaden van auteursrechtelijk beschermde inhoud zonder de toestemming van de auteur mijn account kan beperken en/of juridische gevolgen kan hebben. Ik weet dat ik me volledig moet houden aan alle regels voor het maken van inhoud die worden genoemd in de servicevoorwaarden van Alpha Blend Interactive."
|
||||
},
|
||||
{
|
||||
"ABI_UI_BUILDSTEP_DETAILS_LEGAL_TAGS",
|
||||
"Hierbij verklaar ik dat de tags correct zijn ingesteld en passen bij de geüploade inhoud. Ik weet dat het willens en wetens instellen van de verkeerde tags een ernstige overtreding is. Ik weet dat mijn account wordt gestraft als ik voortdurend de verkeerde tags instel."
|
||||
},
|
||||
{
|
||||
"ABI_UI_BUILDSTEP_UPLOAD_STEP_DETAILS",
|
||||
"Uw inhoud wordt nu geüpload naar ons netwerk. Het uploadproces is opgedeeld in verschillende stappen. Na het uploaden van het bestand naar ons netwerk, ondergaat het bestand automatische beveiligingscontroles, nadat ze zijn goedgekeurd, zullen we uw bundel versleutelen en naar ons CDN pushen. Je kunt hieronder de huidige status van je upload bekijken."
|
||||
},
|
||||
{
|
||||
"ABI_UI_BUILDSTEP_UPLOAD_DETAILS_MISSING",
|
||||
"Om inhoud naar ons platform te uploaden, is een naam vereist. Zorg er bij het uploaden van een nieuw object voor dat u het dienovereenkomstig een naam geeft. U wordt nu teruggestuurd naar de detailpagina om een naam in te voeren."
|
||||
},
|
||||
{
|
||||
"ABI_UI_BUILDSTEP_UPLOAD_LEGAL_MISSING",
|
||||
"Om naar ons platform te uploaden, moet u bevestigen dat u de inhoud mag uploaden en dat alle ingestelde tags correct zijn. U wordt nu teruggestuurd naar de juridische pagina om de juridische verzekering te bekijken en te accepteren."
|
||||
},
|
||||
{ "ABI_UI_DETAILS_HEAD_CHANGELOG", "Inhoudswijzigingslog" },
|
||||
{ "ABI_UI_DETAILS_HEAD_STATISTICS", "Bestandsstatistieken" },
|
||||
{ "ABI_UI_LEGAL_HEAD_OWNERSHIP", "Juridische zekerheid: eigendom en auteursrecht" },
|
||||
{ "ABI_UI_LEGAL_HEAD_TAGS", "Juridische zekerheid: taggen" },
|
||||
{ "ABI_UI_TAGS_HEADER_AUDIO", "Geluid ervaring" },
|
||||
{ "ABI_UI_TAGS_HEADER_VISUAL", "Visuele ervaring" },
|
||||
{ "ABI_UI_TAGS_HEADER_CONTENT", "Inhoud" },
|
||||
{ "ABI_UI_TAGS_HEADER_NSFW", "Leeftijds grens classificatie" },
|
||||
{ "ABI_UI_TAGS_LOUD_AUDIO", "Luid geluid" },
|
||||
{ "ABI_UI_TAGS_LR_AUDIO", "Langeafstandsaudio" },
|
||||
{ "ABI_UI_TAGS_SPAWN_AUDIO", "Spawn-audio" },
|
||||
{ "ABI_UI_TAGS_CONTAINS_MUSIC", "Bevat Muziek" },
|
||||
{ "ABI_UI_TAGS_FLASHING_COLORS", "Knipperende kleuren" },
|
||||
{ "ABI_UI_TAGS_FLASHING_LIGHTS", "Flitsende lichten" },
|
||||
{ "ABI_UI_TAGS_EXTREMELY_BRIGHT", "Extreem vel licht" },
|
||||
{ "ABI_UI_TAGS_SCREEN_EFFECTS", "Schermeffecten" },
|
||||
{ "ABI_UI_TAGS_PARTICLE_SYSTEMS", "Particle Systeem" },
|
||||
{ "ABI_UI_TAGS_VIOLENCE", "Geweld" },
|
||||
{ "ABI_UI_TAGS_GORE", "Gore" },
|
||||
{ "ABI_UI_TAGS_HORROR", "Horror" },
|
||||
{ "ABI_UI_TAGS_JUMPSCARE", "Jumpscare" },
|
||||
{ "ABI_UI_TAGS_HUGE", "Extreem Groot" },
|
||||
{ "ABI_UI_TAGS_SMALL", "Extreem Klein" },
|
||||
{ "ABI_UI_TAGS_SUGGESTIVE", "Suggestief" },
|
||||
{ "ABI_UI_TAGS_NUDITY", "Naaktheid" },
|
||||
{ "ABI_UI_API_RESPONSE_HEAD", "Huidige status" },
|
||||
{ "ABI_UI_API_RESPONSES_UPLOADED", "Bestand wordt geüpload. Bezig met verwerken van bestand." },
|
||||
{ "ABI_UI_API_RESPONSES_SECURITY_CHECKING", "De activebundel wordt momenteel gecontroleerd door ons beveiligingssysteem." },
|
||||
{ "ABI_UI_API_RESPONSES_ENCRYPTING", "Uw activebundelbestand wordt momenteel versleuteld." },
|
||||
{ "ABI_UI_API_RESPONSES_PUSHING", "De controles zijn voltooid. Het bestand wordt momenteel overgebracht naar onze opslag." },
|
||||
{ "ABI_UI_API_RESPONSES_FINISHED", "Upload compleet. Je inhoud is nu beschikbaar in de game." },
|
||||
};
|
||||
}
|
||||
}
|
3
Assets/ABI.CCK/Scripts/Translation/Dutch.cs.meta
Executable file
3
Assets/ABI.CCK/Scripts/Translation/Dutch.cs.meta
Executable file
|
@ -0,0 +1,3 @@
|
|||
fileFormatVersion: 2
|
||||
guid: fddeebcee82c429b81eba4a50494e437
|
||||
timeCreated: 1637944116
|
356
Assets/ABI.CCK/Scripts/Translation/English.cs
Executable file
356
Assets/ABI.CCK/Scripts/Translation/English.cs
Executable file
|
@ -0,0 +1,356 @@
|
|||
using System.Collections.Generic;
|
||||
|
||||
namespace ABI.CCK.Scripts.Translation
|
||||
{
|
||||
public class English
|
||||
{
|
||||
public static readonly Dictionary<string, string> Localization = new Dictionary<string, string>()
|
||||
{
|
||||
{"ABI_UI_BUILDPANEL_HEADING_BUILDER", "Content Builder"},
|
||||
{"ABI_UI_BUILDPANEL_HEADING_SETTINGS", "Settings & Options"},
|
||||
{"ABI_UI_BUILDPANEL_HEADING_DOCUMENTATION", "View our documentation"},
|
||||
{"ABI_UI_BUILDPANEL_HEADING_FEEDBACK", "Submit feedback"},
|
||||
{"ABI_UI_BUILDPANEL_HEADING_FOUNDCONTENT", "Content found in active scene"},
|
||||
{"ABI_UI_BUILDPANEL_HEADING_ACCOUNT_INFO", "Account Information"},
|
||||
{"ABI_UI_BUILDPANEL_LOGIN_CREDENTIALS_INCORRECT", "The provided login credentials are incorrect."},
|
||||
{"ABI_UI_BUILDPANEL_LOGIN_BUTTON", "Log in"},
|
||||
{"ABI_UI_BUILDPANEL_LOGOUT_BUTTON", "Log out"},
|
||||
{"ABI_UI_BUILDPANEL_LOGOUT_DIALOG_TITLE", "Remove local credentials for CCK"},
|
||||
{
|
||||
"ABI_UI_BUILDPANEL_LOGOUT_DIALOG_BODY",
|
||||
"This will remove the locally stored credentials. You will have to re-authenticate. Do you want to continue?"
|
||||
},
|
||||
{"ABI_UI_BUILDPANEL_LOGOUT_DIALOG_ACCEPT", "Yes!"},
|
||||
{"ABI_UI_BUILDPANEL_LOGOUT_DIALOG_DECLINE", "No!"},
|
||||
|
||||
{"ABI_UI_BUILDPANEL_UPLOADER_NO_AVATARS_FOUND", "No configured avatars found in scene - CVRAvatar added?"},
|
||||
{
|
||||
"ABI_UI_BUILDPANEL_UPLOADER_NO_SPAWNABLES_FOUND",
|
||||
"No configured spawnable objects found in scene - CVRSpawnable added?"
|
||||
},
|
||||
{
|
||||
"ABI_UI_BUILDPANEL_WORLDS_WARNING_SPAWNPOINT",
|
||||
"Your world does not have any spawn points assigned. Please add one or multiple spawn points in the CVRWorld component or the location of the CVRWorld holder object will be used."
|
||||
},
|
||||
{
|
||||
"ABI_UI_BUILDPANEL_WORLDS_INFO_REFERENCE_CAMERA",
|
||||
"You do not have a reference camera assigned to your world. Default camera settings will be used."
|
||||
},
|
||||
{
|
||||
"ABI_UI_BUILDPANEL_WORLDS_INFO_RESPAWN_HEIGHT",
|
||||
"The respawn height is under -500. It will take a long time to respawn when falling out of the map. This is probably not what you want."
|
||||
},
|
||||
{
|
||||
"ABI_UI_BUILDPANEL_WORLDS_ERROR_MULTIPLE_CVR_WORLD",
|
||||
"Multiple CVR World objects are present in the scene. This will break the world. Please ensure that there is only one CVR World object in the scene or use our CVRWorld prefab."
|
||||
},
|
||||
{
|
||||
"ABI_UI_BUILDPANEL_WORLDS_ERROR_WORLD_CONTAINS_AVATAR",
|
||||
"Loaded scenes should never contain both avatar and world descriptor objects. Please setup your scenes accordingly."
|
||||
},
|
||||
{
|
||||
"ABI_UI_BUILDPANEL_WORLDS_ERROR_NO_CONTENT",
|
||||
"No content found in present scene. Did you forget to add a descriptor component to a game object?"
|
||||
},
|
||||
{
|
||||
"ABI_UI_BUILDPANEL_WORLDS_ERROR_UNITY_UNSUPPORTED",
|
||||
"You are using a unity version that is not supported. Please use a supported unity version. You can check the supported version corresponding to your CCK version in our documentation."
|
||||
},
|
||||
{"ABI_UI_BUILDPANEL_UPLOAD_WORLD_BUTTON", "Upload World"},
|
||||
{"ABI_UI_BUILDPANEL_UPLOAD_AVATAR_BUTTON", "Upload Avatar"},
|
||||
{"ABI_UI_BUILDPANEL_UPLOAD_PROP_BUTTON", "Upload Spawnable Object"},
|
||||
{"ABI_UI_BUILDPANEL_FIX_IMPORT_SETTINGS", "Fix import settings"},
|
||||
{"ABI_UI_BUILDPANEL_UTIL_REMOVE_MISSING_SCRIPTS_BUTTON", "Remove missing scripts"},
|
||||
{"ABI_UI_BUILDPANEL_LOGIN_TEXT_USERNAME", "Username"},
|
||||
{"ABI_UI_BUILDPANEL_LOGIN_TEXT_ACCESSKEY", "Access-Key"},
|
||||
{
|
||||
"ABI_UI_BUILDPANEL_INFOTEXT_DOCUMENTATION",
|
||||
"Use our documentation to find out more about how to create content for our games. You will also find some handy tutorials on how to utilize most of the core engine features and core game features there."
|
||||
},
|
||||
{"ABI_UI_BUILDPANEL_INFOTEXT_SIGNIN1", "Please authenticate using your CCK credentials."},
|
||||
{"ABI_UI_BUILDPANEL_INFOTEXT_SIGNIN2", "You can find those on hub.abinteractive.net."},
|
||||
{"ABI_UI_BUILDPANEL_INFOTEXT_SIGNIN3", "Please generate a CCK Key in the key manager."},
|
||||
{"ABI_UI_BUILDPANEL_INFOTEXT_AUTHENTICATED_AS", "Authenticated as"},
|
||||
{"ABI_UI_BUILDPANEL_INFOTEXT_USER_RANK", "API user rank"},
|
||||
{"ABI_UI_BUILDPANEL_SETTINGS_HEADER", "Upload Settings"},
|
||||
{"ABI_UI_BUILDPANEL_SETTINGS_CONTENT_ENCRYPTION", "Switch Connection Encryption:"},
|
||||
{
|
||||
"ABI_UI_BUILDPANEL_SETTINGS_HINT_CONTENT_ENCRYPTION",
|
||||
"If you have Problems uploading try switching to http."
|
||||
},
|
||||
{"ABI_UI_BUILDPANEL_SETTINGS_CONTENT_REGION", "Preferred Upload Region:"},
|
||||
{
|
||||
"ABI_UI_BUILDPANEL_SETTINGS_HINT_CONTENT_REGION",
|
||||
"You can switch the preferred Upload Region to increase your upload speed. If the preferred region is unavailable, another region will be selected automatically. Your content is available everywhere, independently of the region chosen to upload."
|
||||
},
|
||||
{"ABI_UI_BUILDPANEL_SETTINGS_CCK_LANGUAGE", "CCK Language:"},
|
||||
{
|
||||
"ABI_UI_BUILDPANEL_SETTINGS_HINT_CCK_LANGUAGE",
|
||||
"You can switch your CCK language here in order to get notifications and UI texts in your preferred language."
|
||||
},
|
||||
{
|
||||
"ABI_UI_BUILDPANEL_WARNING_FOLDERPATH",
|
||||
"Please do not move the folder location of the CCK or CCK Mods folder. This will render the CCK unusable."
|
||||
},
|
||||
{
|
||||
"ABI_UI_BUILDPANEL_WARNING_FEEDBACK",
|
||||
"Want to request a feature? Found a bug? Post on our feedback platform!"
|
||||
},
|
||||
{"ABI_UI_BUILDPANEL_WARNING_MESH_FILTER_MESH_EMPTY", "MeshFilter with missing Mesh detected"},
|
||||
{
|
||||
"ABI_UI_BUILDPANEL_AVATAR_ERROR_ANIMATOR",
|
||||
"No Animator was detected for this Avatar. Make sure, that an Animator is present on the same GameObject as the CVRAvatar Component."
|
||||
},
|
||||
{
|
||||
"ABI_UI_BUILDPANEL_AVATAR_WARNING_GENERIC",
|
||||
"The Avatar Slot in your Avatar Animator is not filled. Your Avatar will be considered as generic Avatar."
|
||||
},
|
||||
{
|
||||
"ABI_UI_BUILDPANEL_AVATAR_WARNING_POLYGONS",
|
||||
"Warning: This avatar has more than 100k ({X}) polygons in total. This can cause performance problems in game. This does not prevent you from uploading."
|
||||
},
|
||||
{
|
||||
"ABI_UI_BUILDPANEL_AVATAR_WARNING_SKINNED_MESH_RENDERERS",
|
||||
"Warning: This avatar contains more than 10 ({X}) SkinnedMeshRenderer components. This can cause performance problems in game. This does not prevent you from uploading."
|
||||
},
|
||||
{
|
||||
"ABI_UI_BUILDPANEL_AVATAR_WARNING_MATERIALS",
|
||||
"Warning: This avatar utilizes more than 20 ({X}) material slots. This can cause performance problems in game. This does not prevent you from uploading."
|
||||
},
|
||||
{
|
||||
"ABI_UI_BUILDPANEL_AVATAR_WARNING_VIEWPOINT",
|
||||
"Warning: The view position of this avatar defaults to X=0,Y=0,Z=0. This means your view position is on the ground. This is probably not what you want."
|
||||
},
|
||||
{"ABI_UI_BUILDPANEL_AVATAR_WARNING_NON_HUMANOID", "Warning: Your Avatar is not setup as Humanoid."},
|
||||
{
|
||||
"ABI_UI_BUILDPANEL_AVATAR_WARNING_LEGACY_BLENDSHAPES",
|
||||
"Warning: This Avatar has none legacy blend shape normals. This will lead to an increased filesize and lighting errors"
|
||||
},
|
||||
{
|
||||
"ABI_UI_BUILDPANEL_AVATAR_INFO_POLYGONS",
|
||||
"Info: This avatar has more than 50k ({X}) polygons in total. This can cause performance problems in game. This does not prevent you from uploading."
|
||||
},
|
||||
{
|
||||
"ABI_UI_BUILDPANEL_AVATAR_INFO_SKINNED_MESH_RENDERERS",
|
||||
"Info: This avatar contains more than 5 ({X}) SkinnedMeshRenderer components. This can cause performance problems in game. This does not prevent you from uploading."
|
||||
},
|
||||
{
|
||||
"ABI_UI_BUILDPANEL_AVATAR_INFO_MATERIALS",
|
||||
"Info: This avatar utilizes more than 10 ({X}) material slots. This can cause performance problems in game. This does not prevent you from uploading."
|
||||
},
|
||||
{
|
||||
"ABI_UI_BUILDPANEL_AVATAR_INFO_SMALL",
|
||||
"Info: The view position of this avatar is under 0.5 in height. This avatar is considered excessively small."
|
||||
},
|
||||
{
|
||||
"ABI_UI_BUILDPANEL_AVATAR_INFO_HUGE",
|
||||
"Info: The view position of this avatar is over 3.0 in height. This avatar is considered excessively huge."
|
||||
},
|
||||
{"ABI_UI_BUILDPANEL_AVATAR_UPLOAD_BUTTON", "Upload Avatar"},
|
||||
{
|
||||
"ABI_UI_BUILDPANEL_PROPS_ERROR_MISSING_SCRIPT",
|
||||
"Spawnable Objects or its children contains missing scripts. The upload will fail like this. Remove all missing script references before uploading or click Remove all missing scripts to automatically have this done for you."
|
||||
},
|
||||
{
|
||||
"ABI_UI_BUILDPANEL_PROPS_WARNING_POLYGONS",
|
||||
"Warning: This spawnable object has more than 100k ({X}) polygons in total. This can cause performance problems in game. This does not prevent you from uploading."
|
||||
},
|
||||
{
|
||||
"ABI_UI_BUILDPANEL_PROPS_WARNING_SKINNED_MESH_RENDERERS",
|
||||
"Warning: This spawnable object contains more than 10 ({X}) SkinnedMeshRenderer components. This can cause performance problems in game. This does not prevent you from uploading."
|
||||
},
|
||||
{
|
||||
"ABI_UI_BUILDPANEL_PROPS_WARNING_MATERIALS",
|
||||
"Warning: This spawnable object utilizes more than 20 ({X}) material slots. This can cause performance problems in game. This does not prevent you from uploading."
|
||||
},
|
||||
{
|
||||
"ABI_UI_BUILDPANEL_PROPS_WARNING_LEGACY_BLENDSHAPES",
|
||||
"Warning: This spawnable object has none legacy blend shape normals. This will lead to an increased filesize and lighting errors"
|
||||
},
|
||||
{
|
||||
"ABI_UI_BUILDPANEL_PROPS_INFO_POLYGONS",
|
||||
"Info: This spawnable object has more than 50k ({X}) polygons in total. This can cause performance problems in game. This does not prevent you from uploading."
|
||||
},
|
||||
{
|
||||
"ABI_UI_BUILDPANEL_PROPS_INFO_SKINNED_MESH_RENDERERS",
|
||||
"Info: This spawnable object contains more than 5 ({X}) SkinnedMeshRenderer components. This can cause performance problems in game. This does not prevent you from uploading."
|
||||
},
|
||||
{
|
||||
"ABI_UI_BUILDPANEL_PROPS_INFO_MATERIALS",
|
||||
"Info: This spawnable object utilizes more than 10 ({X}) material slots. This can cause performance problems in game. This does not prevent you from uploading."
|
||||
},
|
||||
{"ABI_UI_BUILDPANEL_PROPS_UPLOAD_BUTTON", "Upload Spawnable Object (Prop)"},
|
||||
{
|
||||
"ABI_UI_BUILDPANEL_ERROR_WORLD_MISSING_SCRIPTS",
|
||||
"Scene contains missing scripts. The upload will fail like this. Remove all missing script references before uploading or click Remove all missing scripts to automatically have this done for you."
|
||||
},
|
||||
{
|
||||
"ABI_UI_BUILDPANEL_ERROR_AVATAR_MISSING_SCRIPTS",
|
||||
"Avatar or its children contains missing scripts. The upload will fail like this. Remove all missing script references before uploading or click Remove all missing scripts to automatically have this done for you."
|
||||
},
|
||||
{
|
||||
"ABI_UI_ADVAVTR_TRIGGER_MULTIPLE_TRIGGER_HELPBOX",
|
||||
"Having multiple Triggers on the same GameObject will lead to unpredictable behavior!"
|
||||
},
|
||||
{
|
||||
"ABI_UI_ADVAVTR_TRIGGER_ALLOWED_POINTERS_HELPBOX",
|
||||
"Adding Pointers to the \"Allowed Pointers\" List will Ignore all other Pointers that are not contained in it."
|
||||
},
|
||||
{
|
||||
"ABI_UI_ADVAVTR_TRIGGER_ALLOWED_TYPES_HELPBOX",
|
||||
"Adding Types in the \"Allowed Types\" List will ignore all Pointers that do not match the Types in the List."
|
||||
},
|
||||
{
|
||||
"ABI_UI_ADVAVTR_TRIGGER_PARTICLE_HELPBOX",
|
||||
"Enabling this option will allow particle systems that have a pointer on the same GameObject to activate this trigger. Particle can only trigger On Enter Trigger."
|
||||
},
|
||||
{
|
||||
"ABI_UI_INFOTEXT_WORLDS_NO_AVATARS",
|
||||
"A ChilloutVR World object has been found in the scene. Avatars can not be uploaded until the world object has been removed. Avatars / spawnable objects will be part of the world and visible in-world unless they are disabled or removed."
|
||||
},
|
||||
{
|
||||
"ABI_UI_ASSET_INFO_HEADER_INFORMATION",
|
||||
"This script is used to store object metadata. Please do not modify the data on it unless you know what you are doing. To reupload an avatar, detach the Guid and reupload."
|
||||
},
|
||||
{"ABI_UI_ASSET_INFO_GUID_LABEL", "The currently stored Guid is: "},
|
||||
{"ABI_UI_ASSET_INFO_DETACH_BUTTON", "Detach asset unique identifier"},
|
||||
{"ABI_UI_ASSET_INFO_DETACH_BUTTON_DIALOG_TITLE", "Detach Guid from Asset Info Manager"},
|
||||
{
|
||||
"ABI_UI_ASSET_INFO_DETACH_BUTTON_DIALOG_BODY",
|
||||
"The asset unique identifier will be detached. This means that your content will most likely be uploaded as new on runtime. Continue?"
|
||||
},
|
||||
{"ABI_UI_ASSET_INFO_DETACH_BUTTON_DIALOG_ACCEPT", "Yes!"},
|
||||
{"ABI_UI_ASSET_INFO_DETACH_BUTTON_DIALOG_DENY", "No!"},
|
||||
{"ABI_UI_ASSET_INFO_COPY_BUTTON", "Copy asset unique identifier"},
|
||||
{"ABI_UI_ASSET_INFO_ATTACH_LABEL", "Unique identifier"},
|
||||
{
|
||||
"ABI_UI_ASSET_INFO_ATTACH_INFO",
|
||||
"You do not need to re-attach a Guid if you do not plan to overwrite any old upload. A new one will be generated on upload if none is attached."
|
||||
},
|
||||
{"ABI_UI_ASSET_INFO_ATTACH_BUTTON", "Re-Attach guid"},
|
||||
{
|
||||
"ABI_UI_AVATAR_INFO_VIEWPOINT",
|
||||
"Controls your player rigs camera position in game. This should be between both eyes."
|
||||
},
|
||||
{
|
||||
"ABI_UI_AVATAR_INFO_VOICE_POSITION",
|
||||
"Controls your player rigs voice position in game. This should be on your mouth."
|
||||
},
|
||||
{
|
||||
"ABI_UI_AVATAR_INFO_OVERRIDE_CONTROLLER",
|
||||
"For the overrides to work, please make sure, that the correct animator is assigned in the override controller. Otherwise you will not see animator slots to override. An example for this is in the CCK Player Prefabs folder."
|
||||
},
|
||||
{
|
||||
"ABI_UI_AVATAR_INFO_BLinking",
|
||||
"Blinking blend shape usage is optional. It can be enabled to generate random blinks on runtime."
|
||||
},
|
||||
{
|
||||
"ABI_UI_AVATAR_INFO_EYE_MOVEMENT",
|
||||
"Checking this option will enable a semi realistic animation of the eyes."
|
||||
},
|
||||
{
|
||||
"ABI_UI_AVATAR_INFO_EYE_VISEMES",
|
||||
"For the auto-select visemes feature to work, you will have to select the mesh that includes the face first. This will be the body mesh in most cases."
|
||||
},
|
||||
{
|
||||
"ABI_UI_MODULE_WORKSHOP_MISSING_DEPENDENCIES_TITLE",
|
||||
"Dependencies missing in project!"
|
||||
},
|
||||
{
|
||||
"ABI_UI_MODULE_WORKSHOP_MISSING_DEPENDENCIES_WARNING_PREFACE",
|
||||
"The following dependencies are not met"
|
||||
},
|
||||
{
|
||||
"ABI_UI_MODULE_WORKSHOP_MISSING_DEPENDENCIES_FINAL_WARNING",
|
||||
"Please install all dependencies before installing this module!"
|
||||
},
|
||||
{
|
||||
"ABI_UI_MODULE_WORKSHOP_MISSING_DEPENDENCIES_DIALOG_ACCEPT",
|
||||
"Understood"
|
||||
},
|
||||
{ "ABI_UI_BUILD_RUNTIME_HEADER", "Upload content to ChilloutVR" },
|
||||
{ "ABI_UI_BUILD_RUNTIME_BTN_NEXT", "Continue to next step" },
|
||||
{ "ABI_UI_BUILD_RUNTIME_BTN_PREV", "Back to last step" },
|
||||
{ "ABI_UI_BUILD_RUNTIME_BTN_NEW_PICTURE", "Replace image" },
|
||||
{ "ABI_UI_BUILD_RUNTIME_FILEINFO_ASSETBUNDLE", "AssetBundle File Size" },
|
||||
{ "ABI_UI_BUILD_RUNTIME_FILEINFO_IMAGE", "Image File Size" },
|
||||
{ "ABI_UI_BUILD_RUNTIME_FILEINFO_MANIFEST", "Manifest File Size" },
|
||||
{ "ABI_UI_BUILD_RUNTIME_FILEINFO_PANO1K", "1080P Pano File Size" },
|
||||
{ "ABI_UI_BUILD_RUNTIME_FILEINFO_PANO4K", "4K Pano File Size" },
|
||||
{ "ABI_UI_BUILD_RUNTIME_HINT_CLICK_TO_CAPTURE", "Click smaller image to capture thumbnail" },
|
||||
{ "ABI_UI_BUILDSTEP_FILTERTAGS", "Filter Tags" },
|
||||
{ "ABI_UI_BUILDSTEP_DETAILS", "Details" },
|
||||
{ "ABI_UI_BUILDSTEP_LEGAL", "Legal Assurance" },
|
||||
{ "ABI_UI_BUILDSTEP_UPLOAD", "Upload Content" },
|
||||
{ "ABI_UI_BUILDSTEP_DETAILS_NAME_ROW", "Name:" },
|
||||
{ "ABI_UI_BUILDSTEP_DETAILS_DESC_ROW", "Description:" },
|
||||
{ "ABI_UI_BUILDSTEP_DETAILS_NAME_PLACEHOLDER", "Object name (required!)" },
|
||||
{ "ABI_UI_BUILDSTEP_DETAILS_DESC_PLACEHOLDER", "Object description" },
|
||||
{ "ABI_UI_BUILDSTEP_DETAILS_CHANGELOG_PLACEHOLDER", "Object changelog - tell users what you have changed or added" },
|
||||
{
|
||||
"ABI_UI_BUILDSTEP_DETAILS_WARNING_NEW_OBJECT",
|
||||
"This object is uploaded for the first time. Uploading a profile picture is required, as such the option to not upload any image is not available."
|
||||
},
|
||||
{
|
||||
"ABI_UI_BUILDSTEP_DETAILS_WARNING_UPDATING_OBJECT",
|
||||
"You are about to update this object. Changing description or name is not available while updating this object. Please change it on the hub if required."
|
||||
},
|
||||
{
|
||||
"ABI_UI_BUILDSTEP_DETAILS_SET_ACTIVE_FILE",
|
||||
"Set this upload as the active file for the target platform"
|
||||
},
|
||||
{
|
||||
"ABI_UI_BUILDSTEP_DETAILS_LEGAL_PERMISSION",
|
||||
"I hereby certify that my uploaded content belongs to or is licensed to me. I know that uploading copyrighted content without the authors permission can get my account restricted and / or have legal consequences. I know that i have to fully adhere to any and all content creation rules mentioned in the terms of service of Alpha Blend Interactive."
|
||||
},
|
||||
{
|
||||
"ABI_UI_BUILDSTEP_DETAILS_LEGAL_TAGS",
|
||||
"I hereby certify that the tags are set correctly and fit to the uploaded content. I know that knowingly setting the wrong tags is a serious offense. I know that my account will be punished if i continuously set the wrong tags."
|
||||
},
|
||||
{
|
||||
"ABI_UI_BUILDSTEP_UPLOAD_STEP_DETAILS",
|
||||
"Your content is now being uploaded to our network. The upload process is split into various steps. After uploading the file to our network, the file will undergo automatic security checks, after they were passed, we will encrypt your bundle and push it to our CDN. You can check the current status of your upload below."
|
||||
},
|
||||
{
|
||||
"ABI_UI_BUILDSTEP_UPLOAD_DETAILS_MISSING",
|
||||
"To upload content to our platform, a name is required. When uploading a new object, make sure to name it accordingly. You will now be sent back to the details page to enter a name."
|
||||
},
|
||||
{
|
||||
"ABI_UI_BUILDSTEP_UPLOAD_LEGAL_MISSING",
|
||||
"To upload to our platform, you have to certify that you are permitted to upload said content and that all set tags are correct. You will now be sent back to the legal page to review and accept the legal assurance."
|
||||
},
|
||||
{ "ABI_UI_DETAILS_HEAD_CHANGELOG", "Content Changelog" },
|
||||
{ "ABI_UI_DETAILS_HEAD_STATISTICS", "File Statistics" },
|
||||
{ "ABI_UI_LEGAL_HEAD_OWNERSHIP", "Legal Assurance: Ownership & Copyright" },
|
||||
{ "ABI_UI_LEGAL_HEAD_TAGS", "Legal Assurance: Tagging" },
|
||||
{ "ABI_UI_TAGS_HEADER_AUDIO", "Audible Experience" },
|
||||
{ "ABI_UI_TAGS_HEADER_VISUAL", "Visual Experience" },
|
||||
{ "ABI_UI_TAGS_HEADER_CONTENT", "Content" },
|
||||
{ "ABI_UI_TAGS_HEADER_NSFW", "Age Gate Classification" },
|
||||
{ "ABI_UI_TAGS_LOUD_AUDIO", "Loud Audio" },
|
||||
{ "ABI_UI_TAGS_LR_AUDIO", "Long-Range Audio" },
|
||||
{ "ABI_UI_TAGS_SPAWN_AUDIO", "Spawn Audio" },
|
||||
{ "ABI_UI_TAGS_CONTAINS_MUSIC", "Contains Music" },
|
||||
{ "ABI_UI_TAGS_FLASHING_COLORS", "Flashing Colors" },
|
||||
{ "ABI_UI_TAGS_FLASHING_LIGHTS", "Flashing Lights" },
|
||||
{ "ABI_UI_TAGS_EXTREMELY_BRIGHT", "Extremely Bright" },
|
||||
{ "ABI_UI_TAGS_SCREEN_EFFECTS", "Screen Effects" },
|
||||
{ "ABI_UI_TAGS_PARTICLE_SYSTEMS", "Particle Systems" },
|
||||
{ "ABI_UI_TAGS_VIOLENCE", "Violence" },
|
||||
{ "ABI_UI_TAGS_GORE", "Gore" },
|
||||
{ "ABI_UI_TAGS_HORROR", "Horror" },
|
||||
{ "ABI_UI_TAGS_JUMPSCARE", "Jumpscare" },
|
||||
{ "ABI_UI_TAGS_HUGE", "Excessively Huge" },
|
||||
{ "ABI_UI_TAGS_SMALL", "Excessively Small" },
|
||||
{ "ABI_UI_TAGS_SUGGESTIVE", "Suggestive" },
|
||||
{ "ABI_UI_TAGS_NUDITY", "Nudity" },
|
||||
{ "ABI_UI_API_RESPONSE_HEAD", "Current Status" },
|
||||
{ "ABI_UI_API_RESPONSES_UPLOADED", "File is uploaded. Now processing file." },
|
||||
{ "ABI_UI_API_RESPONSES_SECURITY_CHECKING", "The asset bundle is currently being checked by our security system." },
|
||||
{ "ABI_UI_API_RESPONSES_ENCRYPTING", "Your asset bundle file is currently being encrypted." },
|
||||
{ "ABI_UI_API_RESPONSES_PUSHING", "Checks are complete. The file is currently being transferred to our storage." },
|
||||
{ "ABI_UI_API_RESPONSES_FINISHED", "Upload complete. Your content is now available in the game." },
|
||||
{ "ABI_UI_API_RESPONSES_FLAGGED_BY_SECURITY_SYSTEM", "Upload complete. Your file was flagged by our security system and might not be available to some users." }
|
||||
};
|
||||
}
|
||||
}
|
3
Assets/ABI.CCK/Scripts/Translation/English.cs.meta
Executable file
3
Assets/ABI.CCK/Scripts/Translation/English.cs.meta
Executable file
|
@ -0,0 +1,3 @@
|
|||
fileFormatVersion: 2
|
||||
guid: c11f8cfcc1704e8b8c23d5a5deebaaea
|
||||
timeCreated: 1621175830
|
354
Assets/ABI.CCK/Scripts/Translation/French.cs
Executable file
354
Assets/ABI.CCK/Scripts/Translation/French.cs
Executable file
|
@ -0,0 +1,354 @@
|
|||
using System.Collections.Generic;
|
||||
|
||||
namespace ABI.CCK.Scripts.Translation
|
||||
{
|
||||
public class French
|
||||
{
|
||||
public static readonly Dictionary<string, string> Localization = new Dictionary<string, string>()
|
||||
{
|
||||
{"ABI_UI_BUILDPANEL_HEADING_BUILDER", "Constructeur de Contenu"},
|
||||
{"ABI_UI_BUILDPANEL_HEADING_SETTINGS", "Réglages & Options"},
|
||||
{"ABI_UI_BUILDPANEL_HEADING_DOCUMENTATION", "Voir notre documentation"},
|
||||
{"ABI_UI_BUILDPANEL_HEADING_FEEDBACK", "Envoyer une remarque"},
|
||||
{"ABI_UI_BUILDPANEL_HEADING_FOUNDCONTENT", "Contenu trouvé dans la scène active"},
|
||||
{"ABI_UI_BUILDPANEL_HEADING_ACCOUNT_INFO", "Informations du compte"},
|
||||
{"ABI_UI_BUILDPANEL_LOGIN_CREDENTIALS_INCORRECT", "Les identifiants de connexion saisis sont incorrects."},
|
||||
{"ABI_UI_BUILDPANEL_LOGIN_BUTTON", "Se connecter"},
|
||||
{"ABI_UI_BUILDPANEL_LOGOUT_BUTTON", "Se déconnecter"},
|
||||
{"ABI_UI_BUILDPANEL_LOGOUT_DIALOG_TITLE", "Supprimer les identifiants locaux pour le CCK"},
|
||||
{
|
||||
"ABI_UI_BUILDPANEL_LOGOUT_DIALOG_BODY",
|
||||
"Ceci va supprimer les identifiants stockés localement. Vous devrez vous réauthentifier. Voulez-vous continuer ?"
|
||||
},
|
||||
{"ABI_UI_BUILDPANEL_LOGOUT_DIALOG_ACCEPT", "Oui !"},
|
||||
{"ABI_UI_BUILDPANEL_LOGOUT_DIALOG_DECLINE", "Non !"},
|
||||
|
||||
{"ABI_UI_BUILDPANEL_UPLOADER_NO_AVATARS_FOUND", "Aucun avatar configuré trouvé dans la scène - CVRAvatar ajouté ?"},
|
||||
{
|
||||
"ABI_UI_BUILDPANEL_UPLOADER_NO_SPAWNABLES_FOUND",
|
||||
"Aucun objet instanciable configuré trouvé dans la scène - CVRSpawnable ajouté ?"
|
||||
},
|
||||
{
|
||||
"ABI_UI_BUILDPANEL_WORLDS_WARNING_SPAWNPOINT",
|
||||
"Votre monde n'a aucun point d'apparition assigné. Veuillez ajouter un ou plusieurs points d'apparitions dans le composant CVRWorld ou la position de l'objet contenant le CVRWorld sera utilisé à la place."
|
||||
},
|
||||
{
|
||||
"ABI_UI_BUILDPANEL_WORLDS_INFO_REFERENCE_CAMERA",
|
||||
"Vous n'avez pas de caméra de référence assignée à votre monde. Les réglages de caméra par défaut seront utilisés."
|
||||
},
|
||||
{
|
||||
"ABI_UI_BUILDPANEL_WORLDS_INFO_RESPAWN_HEIGHT",
|
||||
"La hauteur du point de réapparition est en dessous de -500. Cela prendra un long moment pour réapparaître après une chute hors de la carte. Ce n'est probablement pas ce que vous souhaitez."
|
||||
},
|
||||
{
|
||||
"ABI_UI_BUILDPANEL_WORLDS_ERROR_MULTIPLE_CVR_WORLD",
|
||||
"Plusieurs objets CVR World sont présents dans la scène. Ceci va casser le monde. Veuillez vous assurer qu'il n'y ait qu'un seul objet CVR World dans la scène ou utilisez notre prefab CVRWorld."
|
||||
},
|
||||
{
|
||||
"ABI_UI_BUILDPANEL_WORLDS_ERROR_WORLD_CONTAINS_AVATAR",
|
||||
"Les scènes chargées ne devraient jamais contenir à la fois des descripteurs d'objets avatar et monde. Veuillez configurer vos scènes en conséquence."
|
||||
},
|
||||
{
|
||||
"ABI_UI_BUILDPANEL_WORLDS_ERROR_NO_CONTENT",
|
||||
"Aucun contenu trouvé dans la scène courante. Avez-vous oublié d'ajouter un composant descripteur à votre objet de jeu ?"
|
||||
},
|
||||
{
|
||||
"ABI_UI_BUILDPANEL_WORLDS_ERROR_UNITY_UNSUPPORTED",
|
||||
"Vous utilisez une version d'Unity qui n'est pas compatible. Veuillez utiliser une version compatible d'Unity. Vous pouvez vérifier la version compatible correspondant à votre version du CCK dans notre documentation."
|
||||
},
|
||||
{"ABI_UI_BUILDPANEL_UPLOAD_WORLD_BUTTON", "Mettre en ligne Monde"},
|
||||
{"ABI_UI_BUILDPANEL_UPLOAD_AVATAR_BUTTON", "Mettre en ligne Avatar"},
|
||||
{"ABI_UI_BUILDPANEL_UPLOAD_PROP_BUTTON", "Mettre en ligne Objet Instanciable"},
|
||||
{"ABI_UI_BUILDPANEL_FIX_IMPORT_SETTINGS", "Réparer les réglages d'import"},
|
||||
{"ABI_UI_BUILDPANEL_UTIL_REMOVE_MISSING_SCRIPTS_BUTTON", "Supprimer les scripts manquants"},
|
||||
{"ABI_UI_BUILDPANEL_LOGIN_TEXT_USERNAME", "Nom d'utilisateur"},
|
||||
{"ABI_UI_BUILDPANEL_LOGIN_TEXT_ACCESSKEY", "Clé-Accès"},
|
||||
{
|
||||
"ABI_UI_BUILDPANEL_INFOTEXT_DOCUMENTATION",
|
||||
"Utilisez notre documentation pour en savoir plus sur comment créer du contenu pour nos jeux. Vous trouverez aussi des tutoriaux pratiques sur comment utiliser la plupart des fonctionnalités principales du moteur et du jeu ici."
|
||||
},
|
||||
{"ABI_UI_BUILDPANEL_INFOTEXT_SIGNIN1", "Veuillez vous identifier avec vos identifiants CCK."},
|
||||
{"ABI_UI_BUILDPANEL_INFOTEXT_SIGNIN2", "Vous pouvez trouver ces derniers sur hub.abinteractive.net."},
|
||||
{"ABI_UI_BUILDPANEL_INFOTEXT_SIGNIN3", "Veuillez générer une clé CCK dans le gestionnaire de clés."},
|
||||
{"ABI_UI_BUILDPANEL_INFOTEXT_AUTHENTICATED_AS", "Authentifié(e) en tant que"},
|
||||
{"ABI_UI_BUILDPANEL_INFOTEXT_USER_RANK", "Rang utilisateur API"},
|
||||
{"ABI_UI_BUILDPANEL_SETTINGS_HEADER", "Réglages de mise en ligne"},
|
||||
{"ABI_UI_BUILDPANEL_SETTINGS_CONTENT_ENCRYPTION", "Changer le Chiffrement de Connexion :"},
|
||||
{
|
||||
"ABI_UI_BUILDPANEL_SETTINGS_HINT_CONTENT_ENCRYPTION",
|
||||
"Si vous rencontrez des problèmes pour la mise en ligne essayez de passer en http."
|
||||
},
|
||||
{"ABI_UI_BUILDPANEL_SETTINGS_CONTENT_REGION", "Région de mise en ligne :"},
|
||||
{
|
||||
"ABI_UI_BUILDPANEL_SETTINGS_HINT_CONTENT_REGION",
|
||||
"Vous pouvez changer la Région de mise en ligne pour augmenter votre vitesse d'émission. Votre contenu sera toujours disponible à travers le monde."
|
||||
},
|
||||
{"ABI_UI_BUILDPANEL_SETTINGS_CCK_LANGUAGE", "Langue du CCK :"},
|
||||
{
|
||||
"ABI_UI_BUILDPANEL_SETTINGS_HINT_CCK_LANGUAGE",
|
||||
"Vous pouvez changer la langue du CCK ici afin de recevoir les notifications et les textes de l'UI dans votre langue préférée."
|
||||
},
|
||||
{
|
||||
"ABI_UI_BUILDPANEL_WARNING_FOLDERPATH",
|
||||
"Veuillez ne pas déplacer l'emplacement des dossiers CCK ou CCK Mods. Ceci rendrait le CCK inutilisable."
|
||||
},
|
||||
{
|
||||
"ABI_UI_BUILDPANEL_WARNING_FEEDBACK",
|
||||
"Vous voulez faire une demande de fonctionnalité ? Trouvé un bug ? Publiez le sur notre plateforme de retours utilisateur !"
|
||||
},
|
||||
{"ABI_UI_BUILDPANEL_WARNING_MESH_FILTER_MESH_EMPTY", "MeshFilter avec maillage manquant détecté"},
|
||||
{
|
||||
"ABI_UI_BUILDPANEL_AVATAR_ERROR_ANIMATOR",
|
||||
"Aucun animateur n'a été détecté pour cet avatar. Faites en sorte que l'animateur soit présent sur le même GameObject qui contient le composant CVRAvatar."
|
||||
},
|
||||
{
|
||||
"ABI_UI_BUILDPANEL_AVATAR_WARNING_GENERIC",
|
||||
"L'Emplacement pour Avatar dans votre Animateur Avatar n'est pas rempli. Votre Avatar sera considéré comme un Avatar générique."
|
||||
},
|
||||
{
|
||||
"ABI_UI_BUILDPANEL_AVATAR_WARNING_POLYGONS",
|
||||
"Attention : Cet avatar a plus de 100k ({X}) polygones au total. Cela peut poser des problèmes de performances en jeu. Cela ne vous empêche pas sa mise en ligne."
|
||||
},
|
||||
{
|
||||
"ABI_UI_BUILDPANEL_AVATAR_WARNING_SKINNED_MESH_RENDERERS",
|
||||
"Attention : Cet avatar contient plus de 10 ({X}) composants SkinnedMeshRenderer. Cela peut poser des problèmes de performances en jeu. Cela ne vous empêche pas sa mise en ligne."
|
||||
},
|
||||
{
|
||||
"ABI_UI_BUILDPANEL_AVATAR_WARNING_MATERIALS",
|
||||
"Attention : Cet avatar utilise plus de 20 ({X}) emplacements de materiaux. Cela peut poser des problèmes de performances en jeu. Cela ne vous empêche pas sa mise en ligne."
|
||||
},
|
||||
{
|
||||
"ABI_UI_BUILDPANEL_AVATAR_WARNING_VIEWPOINT",
|
||||
"Attention : La position de la vue de cet avatar est défini par défaut à X=0,Y=0,Z=0. Celà veut dire que la position de votre vue est au sol. Ce n'est probablement pas ce que vous souhaitez."
|
||||
},
|
||||
{"ABI_UI_BUILDPANEL_AVATAR_WARNING_NON_HUMANOID", "Attention : Votre Avatar n'est pas défini en tant qu'Humanoid."},
|
||||
{
|
||||
"ABI_UI_BUILDPANEL_AVATAR_WARNING_LEGACY_BLENDSHAPES",
|
||||
"Attention: Cet avatar n'a aucune legacy blend shape normals. Cela va engendrer une taille de fichier plus grande et des erreurs d'éclairages."
|
||||
},
|
||||
{
|
||||
"ABI_UI_BUILDPANEL_AVATAR_INFO_POLYGONS",
|
||||
"Info : Cet avatar a plus de 50k ({X}) polygones au total. Cela peut poser des problèmes de performances en jeu. Cela ne vous empêche pas sa mise en ligne."
|
||||
},
|
||||
{
|
||||
"ABI_UI_BUILDPANEL_AVATAR_INFO_SKINNED_MESH_RENDERERS",
|
||||
"Info : Cet avatar contient plus de 5 ({X}) composants SkinnedMeshRenderer. Cela peut poser des problèmes de performances en jeu. Cela ne vous empêche pas sa mise en ligne."
|
||||
},
|
||||
{
|
||||
"ABI_UI_BUILDPANEL_AVATAR_INFO_MATERIALS",
|
||||
"Info : Cet avatar utilise plus de 10 ({X}) emplacements de materiaux. Cela peut poser des problèmes de performances en jeu. Cela ne vous empêche pas sa mise en ligne."
|
||||
},
|
||||
{
|
||||
"ABI_UI_BUILDPANEL_AVATAR_INFO_SMALL",
|
||||
"Info : La hauteur de la position de la vue de cet avatar est en dessous de 0.5. Cet avatar est considéré comme extrêmement petit."
|
||||
},
|
||||
{
|
||||
"ABI_UI_BUILDPANEL_AVATAR_INFO_HUGE",
|
||||
"Info : La hauteur position de la vue de cet avatar est au dessus de 3.0. Cet avatar est considéré comme extrêmement énorme."
|
||||
},
|
||||
{"ABI_UI_BUILDPANEL_AVATAR_UPLOAD_BUTTON", "Mettre en ligne Avatar"},
|
||||
{
|
||||
"ABI_UI_BUILDPANEL_PROPS_ERROR_MISSING_SCRIPT",
|
||||
"Des objets instanciables ou leur enfants contiennent des scripts manquants. La mise en ligne va échouer tel quel. Supprimez les références de scripts manquants avant la mise en ligne ou cliquez sur Supprimer tous les scripts manquants pour le faire automatiquement pour vous."
|
||||
},
|
||||
{
|
||||
"ABI_UI_BUILDPANEL_PROPS_WARNING_POLYGONS",
|
||||
"Attention : Cet objet instanciable a plus de 100k ({X}) polygones au total. Cela peut poser des problèmes de performances en jeu. Cela ne vous empêche pas sa mise en ligne."
|
||||
},
|
||||
{
|
||||
"ABI_UI_BUILDPANEL_PROPS_WARNING_SKINNED_MESH_RENDERERS",
|
||||
"Attention : Cet objet instanciable contient plus de 10 ({X}) composants SkinnedMeshRenderer. Cela peut poser des problèmes de performances en jeu. Cela ne vous empêche pas sa mise en ligne."
|
||||
},
|
||||
{
|
||||
"ABI_UI_BUILDPANEL_PROPS_WARNING_MATERIALS",
|
||||
"Attention : Cet objet instanciable utilise plus de 20 ({X}) emplacements de materiaux. Cela peut poser des problèmes de performances en jeu. Cela ne vous empêche pas sa mise en ligne."
|
||||
},
|
||||
{
|
||||
"ABI_UI_BUILDPANEL_PROPS_WARNING_LEGACY_BLENDSHAPES",
|
||||
"Attention : Cet objet instanciable n'a aucune legacy blend shape normals. Cela va engendrer une taille de fichier plus grande et des erreurs d'éclairages."
|
||||
},
|
||||
{
|
||||
"ABI_UI_BUILDPANEL_PROPS_INFO_POLYGONS",
|
||||
"Info : Cet objet instanciable a plus de 50k ({X}) polygones au total. Cela peut poser des problèmes de performances en jeu. Cela ne vous empêche pas sa mise en ligne."
|
||||
},
|
||||
{
|
||||
"ABI_UI_BUILDPANEL_PROPS_INFO_SKINNED_MESH_RENDERERS",
|
||||
"Info : Cet objet instanciable contient plus de 5 ({X}) composants SkinnedMeshRenderer. Cela peut poser des problèmes de performances en jeu. Cela ne vous empêche pas sa mise en ligne."
|
||||
},
|
||||
{
|
||||
"ABI_UI_BUILDPANEL_PROPS_INFO_MATERIALS",
|
||||
"Info : Cet objet instanciable utilise plus de 10 ({X}) emplacements de materiaux. Cela peut poser des problèmes de performances en jeu. Cela ne vous empêche pas sa mise en ligne."
|
||||
},
|
||||
{"ABI_UI_BUILDPANEL_PROPS_UPLOAD_BUTTON", "Mettre en ligne Objet Instanciable (Prop)"},
|
||||
{
|
||||
"ABI_UI_BUILDPANEL_ERROR_WORLD_MISSING_SCRIPTS",
|
||||
"La scène contient des scripts manquants. La mise en ligne va échouer tel quel. Supprimez les références de scripts manquants avant la mise en ligne ou cliquez sur Supprimer tous les scripts manquants pour le faire automatiquement pour vous."
|
||||
},
|
||||
{
|
||||
"ABI_UI_BUILDPANEL_ERROR_AVATAR_MISSING_SCRIPTS",
|
||||
"L'avatar ou ses enfants contiennent des scripts manquants. La mise en ligne va échouer tel quel. Supprimez les références de scriptes manquants avant la mise en ligne ou cliquez sur Supprimer tous les scripts manquants pour le faire automatiquement pour vous."
|
||||
},
|
||||
{
|
||||
"ABI_UI_ADVAVTR_TRIGGER_MULTIPLE_TRIGGER_HELPBOX",
|
||||
"Avoir plusieurs Déclencheurs sur le même GameObject va engendrer un comportement imprévisible!"
|
||||
},
|
||||
{
|
||||
"ABI_UI_ADVAVTR_TRIGGER_ALLOWED_POINTERS_HELPBOX",
|
||||
"Ajouter des Pointeurs à la liste \"Pointeurs Autorisés\" va ignorer tous les autres Pointeurs qui n'en font pas partie."
|
||||
},
|
||||
{
|
||||
"ABI_UI_ADVAVTR_TRIGGER_ALLOWED_TYPES_HELPBOX",
|
||||
"Ajouter des Types dans la liste \"Types Autorisés\" va ignorer tous les Pointeurs qui ne sont pas associés aux Types dans la liste."
|
||||
},
|
||||
{
|
||||
"ABI_UI_ADVAVTR_TRIGGER_PARTICLE_HELPBOX",
|
||||
"Activer cette option autorisera les systèmes de particules qui ont un pointeur sur le même GameObject pour activer ce trigger. Une particule ne peut délencher que le Trigger On Enter."
|
||||
},
|
||||
{
|
||||
"ABI_UI_INFOTEXT_WORLDS_NO_AVATARS",
|
||||
"Un objet ChilloutVR World a été trouvé dans cette scène. Les avatars ne peuvent pas être mis en ligne tant que l'objet World n'est pas supprimé. Avatars / objets instantiables feront partie du monde et seront visible dans ce monde à moins qu'ils ne soient désactivés ou supprimés."
|
||||
},
|
||||
{
|
||||
"ABI_UI_ASSET_INFO_HEADER_INFORMATION",
|
||||
"Ce script est utilisé pour stocker les metadonnées de l'objet. Veuillez ne pas modifier les données dedans à moins ce que vous sachiez ce que vous faites. Pour remettre en ligne un avatar, détachez le Guid et remettez-le en ligne."
|
||||
},
|
||||
{"ABI_UI_ASSET_INFO_GUID_LABEL", "Le Guid stocké actuellement est : "},
|
||||
{"ABI_UI_ASSET_INFO_DETACH_BUTTON", "Détacher l'identifiant unique d'asset"},
|
||||
{"ABI_UI_ASSET_INFO_DETACH_BUTTON_DIALOG_TITLE", "Détacher le Guid du Gestionnaire d'Info d'Asset"},
|
||||
{
|
||||
"ABI_UI_ASSET_INFO_DETACH_BUTTON_DIALOG_BODY",
|
||||
"L'identifiant unique d'asset va être détaché. Ce qui veut dire que votre contenu sera mis en ligne comme nouveau à l'exécution. Continuer ?"
|
||||
},
|
||||
{"ABI_UI_ASSET_INFO_DETACH_BUTTON_DIALOG_ACCEPT", "Oui !"},
|
||||
{"ABI_UI_ASSET_INFO_DETACH_BUTTON_DIALOG_DENY", "Non !"},
|
||||
{"ABI_UI_ASSET_INFO_ATTACH_LABEL", "Identifiant unique"},
|
||||
{
|
||||
"ABI_UI_ASSET_INFO_ATTACH_INFO",
|
||||
"Vous n'avez pas besoin de réattacher un Guid si vous ne planifiez pas d'écraser une ancienne mise en ligne. Un nouveau sera généré à la mise en ligne si aucun n'était attaché."
|
||||
},
|
||||
{"ABI_UI_ASSET_INFO_ATTACH_BUTTON", "Réattacher le guid"},
|
||||
{
|
||||
"ABI_UI_AVATAR_INFO_VIEWPOINT",
|
||||
"Controle la position de la caméra du joueur dans le jeu. Ceci devrait être placé entre les yeux."
|
||||
},
|
||||
{
|
||||
"ABI_UI_AVATAR_INFO_VOICE_POSITION",
|
||||
"Controle la position de la voix du joueur dans le jeu. Ceci devrait être placé sur la bouche."
|
||||
},
|
||||
{
|
||||
"ABI_UI_AVATAR_INFO_OVERRIDE_CONTROLLER",
|
||||
"Pour que les overrides fonctionnent, veuillez faire en sorte que le bon animateur soit assigné dans le contrôleur d'override. Ou sinon, vous ne verrez pas les emplacements de l'animateur à override. Un example pour cela se trouve dans le dossier CCK Player Prefabs."
|
||||
},
|
||||
{
|
||||
"ABI_UI_AVATAR_INFO_BLinking",
|
||||
"L'usage du blend shape de clignement d'oeil est optionnel. Il peut être activé pour générer des clignements aléatoire à l'exécution."
|
||||
},
|
||||
{
|
||||
"ABI_UI_AVATAR_INFO_EYE_MOVEMENT",
|
||||
"Cocher cette option activera une animation semi-réaliste des yeux."
|
||||
},
|
||||
{
|
||||
"ABI_UI_AVATAR_INFO_EYE_VISEMES",
|
||||
"Pour que la fonctionnalité de sélection automatique des visemes marche, vous devez sélectionner le mesh qui inclus le visage en premier. Ce sera le mesh du corp (body) dans la plupart des cas."
|
||||
},
|
||||
{
|
||||
"ABI_UI_MODULE_WORKSHOP_MISSING_DEPENDENCIES_TITLE",
|
||||
"Dépendances manquants dans le projet !"
|
||||
},
|
||||
{
|
||||
"ABI_UI_MODULE_WORKSHOP_MISSING_DEPENDENCIES_WARNING_PREFACE",
|
||||
"Les dépendances suivantes ne sont pas présentes"
|
||||
},
|
||||
{
|
||||
"ABI_UI_MODULE_WORKSHOP_MISSING_DEPENDENCIES_FINAL_WARNING",
|
||||
"Veuillez installer toutes les dépendances avant d'installer ce module !"
|
||||
},
|
||||
{
|
||||
"ABI_UI_MODULE_WORKSHOP_MISSING_DEPENDENCIES_DIALOG_ACCEPT",
|
||||
"Compris"
|
||||
},
|
||||
{ "ABI_UI_BUILD_RUNTIME_HEADER", "Mettre en ligne le contenu sur ChilloutVR" },
|
||||
{ "ABI_UI_BUILD_RUNTIME_BTN_NEXT", "Continuer vers l'étape suivante" },
|
||||
{ "ABI_UI_BUILD_RUNTIME_BTN_PREV", "Retour à létape précedente" },
|
||||
{ "ABI_UI_BUILD_RUNTIME_BTN_NEW_PICTURE", "Remplacer l'image" },
|
||||
{ "ABI_UI_BUILD_RUNTIME_FILEINFO_ASSETBUNDLE", "Taille du fichier AssetBundle" },
|
||||
{ "ABI_UI_BUILD_RUNTIME_FILEINFO_IMAGE", "Taille du fichier image" },
|
||||
{ "ABI_UI_BUILD_RUNTIME_FILEINFO_MANIFEST", "Taille du fichier de manifest" },
|
||||
{ "ABI_UI_BUILD_RUNTIME_FILEINFO_PANO1K", "Taille du fichier 1080P Pano" },
|
||||
{ "ABI_UI_BUILD_RUNTIME_FILEINFO_PANO4K", "Taille du fichier 4K Pano" },
|
||||
{ "ABI_UI_BUILD_RUNTIME_HINT_CLICK_TO_CAPTURE", "Cliquer sur la petite image pour capturer une vignette" },
|
||||
{ "ABI_UI_BUILDSTEP_FILTERTAGS", "Tags de filtrage" },
|
||||
{ "ABI_UI_BUILDSTEP_DETAILS", "Détails" },
|
||||
{ "ABI_UI_BUILDSTEP_LEGAL", "Assurance juridique" },
|
||||
{ "ABI_UI_BUILDSTEP_UPLOAD", "Mettre en ligne le contenu" },
|
||||
{ "ABI_UI_BUILDSTEP_DETAILS_NAME_ROW", "Nom:" },
|
||||
{ "ABI_UI_BUILDSTEP_DETAILS_DESC_ROW", "Description:" },
|
||||
{ "ABI_UI_BUILDSTEP_DETAILS_NAME_PLACEHOLDER", "Nom de l'objet (obligatoire!)" },
|
||||
{ "ABI_UI_BUILDSTEP_DETAILS_DESC_PLACEHOLDER", "Description de l'objet" },
|
||||
{ "ABI_UI_BUILDSTEP_DETAILS_CHANGELOG_PLACEHOLDER", "Journal des modifications d'objet - dites aux utilisateurs ce que vous avez changé ou ajouté" },
|
||||
{
|
||||
"ABI_UI_BUILDSTEP_DETAILS_WARNING_NEW_OBJECT",
|
||||
"Cet objet est mis en ligne pour la première fois. Mettre en ligne une image de profile est obligatoire, à ce titre l'option de ne pas mettre en ligne d'image n'est pas disponible."
|
||||
},
|
||||
{
|
||||
"ABI_UI_BUILDSTEP_DETAILS_WARNING_UPDATING_OBJECT",
|
||||
"Vous êtes sur le point de mettre à jour cet objet. Changer la description ou le nom n'est pas disponible pendant la mise à jour de l'objet. Veuillez changer ça sur le hub si besoin."
|
||||
},
|
||||
{
|
||||
"ABI_UI_BUILDSTEP_DETAILS_SET_ACTIVE_FILE",
|
||||
"Définir cet upload en tant que fichier actif pour la plateforme cible"
|
||||
},
|
||||
{
|
||||
"ABI_UI_BUILDSTEP_DETAILS_LEGAL_PERMISSION",
|
||||
"Je certifie par la présente que mon contenu mis en ligne m'appartient ou est sous licence pour moi. Je sais que mettre en ligne du contenu protégé sans la permission des auteurs peut rendre mon compte restraint et / ou avoir des conséquences légales. Je sais que je dois adhérer entièrement à l'ensemble de toutes les règles sur la création de contenu mentionnées dans les termes de service d'Alpha Blend Interactive."
|
||||
},
|
||||
{
|
||||
"ABI_UI_BUILDSTEP_DETAILS_LEGAL_TAGS",
|
||||
"Je certifie par la présente que les tags sont correctement définis et correspondent au contenu mis en ligne. Je sais que définir sciemment les mauvais tags est une infraction grave. Je sais que mon compte sera puni si je continue encore de définir les mauvais tags."
|
||||
},
|
||||
{
|
||||
"ABI_UI_BUILDSTEP_UPLOAD_STEP_DETAILS",
|
||||
"Votre contenu est maintenant en train d'être mis en ligne sur notre réseau. La procédure de mise en ligne est découpée en plusieurs étapes. Après avoir mis en ligne le fichier sur notre réseau, le fichier va subir des tests automatiques de sécurité, après que ces derniers soient passés, nous allons crypter votre bundle et l'envoyer vers notre CDN. Vous pouvez vérifier le status courant de votre mise en ligne ci-dessous."
|
||||
},
|
||||
{
|
||||
"ABI_UI_BUILDSTEP_UPLOAD_DETAILS_MISSING",
|
||||
"Pour mettre en ligne du contenu sur notre plateforme, un nom est obligatoire. Lors de la mise en ligne d'un nouvel objet, assurez-vous de le nommer en conséquence. Vous allez maintenant être renvoyé vers la page pour saisir un nom."
|
||||
},
|
||||
{
|
||||
"ABI_UI_BUILDSTEP_UPLOAD_LEGAL_MISSING",
|
||||
"Pour mettre en ligne du contenu sur notre plateforme, vous devez certifier que vous êtes autorisé à mettre en ligne le dit contenu et que tous les tags définis sont corrects. Vous allez maintenant être redirigé vers la page juridique pour examiner et accepter l'assurance juridique."
|
||||
},
|
||||
{ "ABI_UI_DETAILS_HEAD_CHANGELOG", "Journal des modifications du contenu" },
|
||||
{ "ABI_UI_DETAILS_HEAD_STATISTICS", "Statistiques de fichier" },
|
||||
{ "ABI_UI_LEGAL_HEAD_OWNERSHIP", "Assurance Juridique: Propriété et Droit d'Auteur" },
|
||||
{ "ABI_UI_LEGAL_HEAD_TAGS", "Assurance Juridique: Tagging" },
|
||||
{ "ABI_UI_TAGS_HEADER_AUDIO", "Experience Audible " },
|
||||
{ "ABI_UI_TAGS_HEADER_VISUAL", "Experience Visuelle" },
|
||||
{ "ABI_UI_TAGS_HEADER_CONTENT", "Contenu" },
|
||||
{ "ABI_UI_TAGS_HEADER_NSFW", "Classification d'age palier" },
|
||||
{ "ABI_UI_TAGS_LOUD_AUDIO", "Audio Bruyant" },
|
||||
{ "ABI_UI_TAGS_LR_AUDIO", "Audio Longue Distance" },
|
||||
{ "ABI_UI_TAGS_SPAWN_AUDIO", "Spawn Audio" },
|
||||
{ "ABI_UI_TAGS_CONTAINS_MUSIC", "Contient de la musique" },
|
||||
{ "ABI_UI_TAGS_FLASHING_COLORS", "Couleurs clignotantes" },
|
||||
{ "ABI_UI_TAGS_FLASHING_LIGHTS", "Lumière clignotantes" },
|
||||
{ "ABI_UI_TAGS_EXTREMELY_BRIGHT", "Extrêmement lumineux" },
|
||||
{ "ABI_UI_TAGS_SCREEN_EFFECTS", "Effet d'écran" },
|
||||
{ "ABI_UI_TAGS_PARTICLE_SYSTEMS", "Système de particules" },
|
||||
{ "ABI_UI_TAGS_VIOLENCE", "Violence" },
|
||||
{ "ABI_UI_TAGS_GORE", "Gore" },
|
||||
{ "ABI_UI_TAGS_HORROR", "Horreur" },
|
||||
{ "ABI_UI_TAGS_JUMPSCARE", "Jumpscare" },
|
||||
{ "ABI_UI_TAGS_HUGE", "Excessivement énorme" },
|
||||
{ "ABI_UI_TAGS_SMALL", "Excessivement petit" },
|
||||
{ "ABI_UI_TAGS_SUGGESTIVE", "Suggestif" },
|
||||
{ "ABI_UI_TAGS_NUDITY", "Nudité" },
|
||||
{ "ABI_UI_API_RESPONSE_HEAD", "Status Courant" },
|
||||
{ "ABI_UI_API_RESPONSES_UPLOADED", "Le fichier est mis en ligne. Fichier en cours de traitement." },
|
||||
{ "ABI_UI_API_RESPONSES_SECURITY_CHECKING", "L'asset bundle est actuellement en train d'être vérifié par notre système de sécurité." },
|
||||
{ "ABI_UI_API_RESPONSES_ENCRYPTING", "Votre fichier d'asset bundle est actuellement en train d'être crypté." },
|
||||
{ "ABI_UI_API_RESPONSES_PUSHING", "Les vérifications sont complétées. Le fichier est en cours de transfert vers notre stockage." },
|
||||
{ "ABI_UI_API_RESPONSES_FINISHED", "Mise en ligne complétée. Votre contenu est maintenant disponible en jeu." },
|
||||
};
|
||||
}
|
||||
}
|
3
Assets/ABI.CCK/Scripts/Translation/French.cs.meta
Executable file
3
Assets/ABI.CCK/Scripts/Translation/French.cs.meta
Executable file
|
@ -0,0 +1,3 @@
|
|||
fileFormatVersion: 2
|
||||
guid: d1e4f8352d8949f4bccd2bb885d6f2d0
|
||||
timeCreated: 1621336717
|
349
Assets/ABI.CCK/Scripts/Translation/German.cs
Executable file
349
Assets/ABI.CCK/Scripts/Translation/German.cs
Executable file
|
@ -0,0 +1,349 @@
|
|||
using System.Collections.Generic;
|
||||
|
||||
namespace ABI.CCK.Scripts.Translation
|
||||
{
|
||||
public class German
|
||||
{
|
||||
public static readonly Dictionary<string, string> Localization = new Dictionary<string, string>()
|
||||
{
|
||||
{"ABI_UI_BUILDPANEL_HEADING_BUILDER", "Inhaltserstellung"},
|
||||
{"ABI_UI_BUILDPANEL_HEADING_SETTINGS", "Einstellungen & Optionen"},
|
||||
{"ABI_UI_BUILDPANEL_HEADING_DOCUMENTATION", "Unsere Dokumentation anzeigen"},
|
||||
{"ABI_UI_BUILDPANEL_HEADING_FEEDBACK", "Gib uns Feedback"},
|
||||
{"ABI_UI_BUILDPANEL_HEADING_FOUNDCONTENT", "Inhalte, die in der aktuellen Szene gefunden wurden"},
|
||||
{"ABI_UI_BUILDPANEL_HEADING_ACCOUNT_INFO", "Account Informationen"},
|
||||
{"ABI_UI_BUILDPANEL_LOGIN_CREDENTIALS_INCORRECT", "Die Login-Daten sind fehlerhaft"},
|
||||
{"ABI_UI_BUILDPANEL_LOGIN_BUTTON", "Anmelden"},
|
||||
{"ABI_UI_BUILDPANEL_LOGOUT_BUTTON", "Abmelden"},
|
||||
{"ABI_UI_BUILDPANEL_LOGOUT_DIALOG_TITLE", "Lokale Anmeldeinformationen für die CCK entfernen"},
|
||||
{
|
||||
"ABI_UI_BUILDPANEL_LOGOUT_DIALOG_BODY",
|
||||
"Dies entfernt die lokal gespeicherten Anmeldeinformationen. Du musst dich danach erneut authentifizieren. Möchtest du fortfahren?"
|
||||
},
|
||||
{"ABI_UI_BUILDPANEL_LOGOUT_DIALOG_ACCEPT", "Ja!"},
|
||||
{"ABI_UI_BUILDPANEL_LOGOUT_DIALOG_DECLINE", "Nein!"},
|
||||
|
||||
{"ABI_UI_BUILDPANEL_UPLOADER_NO_AVATARS_FOUND", "Keine konfigurierten Avatare in der Scene gefunden. - Wurde CVRAvatar hinzugefügt?"},
|
||||
{
|
||||
"ABI_UI_BUILDPANEL_UPLOADER_NO_SPAWNABLES_FOUND",
|
||||
"Keine konfigurierten spawnable objects in der Scene gefunden. - Wurde CVRSpawnable hinzugefügt?"
|
||||
},
|
||||
{
|
||||
"ABI_UI_BUILDPANEL_WORLDS_WARNING_SPAWNPOINT",
|
||||
"Deine Welt hat keine spawn points festgelegt. Bitte füge einen oder mehrere spawn points in der CVRWorld Komponente hinzu. Ansonsten wird der Standort des CVRWorld holder objects genutzt."
|
||||
},
|
||||
{
|
||||
"ABI_UI_BUILDPANEL_WORLDS_INFO_REFERENCE_CAMERA",
|
||||
"Du hast keine Referenz Kamera deiner Welt zugeordnet. Es werden die Standard-Einstellungen der Kamera genutzt."
|
||||
},
|
||||
{
|
||||
"ABI_UI_BUILDPANEL_WORLDS_INFO_RESPAWN_HEIGHT",
|
||||
"Die Respawn-Höhe ist unter -500. Wenn man aus der Map gefallen ist, wird es lange dauern bis man zum Respawn-Punkt wiederkehrt. Das ist warscheinlich nicht etwas was du willst."
|
||||
},
|
||||
{
|
||||
"ABI_UI_BUILDPANEL_WORLDS_ERROR_MULTIPLE_CVR_WORLD",
|
||||
"Es sind mehrere CVR World Scripte in der scene vorhanden. Die Welt wird somit nicht funktionieren. Bitte stell sicher, dass sich nur ein CVR World object in der scene befindet oder verwende unser CVRWorld-Prefab."
|
||||
},
|
||||
{
|
||||
"ABI_UI_BUILDPANEL_WORLDS_ERROR_WORLD_CONTAINS_AVATAR",
|
||||
"Geladene Szenen sollten niemals Avatar- und Welten-Scripte gleichzeitig besitzen. Bitte richte deine scenes entsprechend ein."
|
||||
},
|
||||
{
|
||||
"ABI_UI_BUILDPANEL_WORLDS_ERROR_NO_CONTENT",
|
||||
"Es wurde kein Inhalt in der aktuellen scene gefunden. Hast du vergessen einen descriptor component zu einem game object hinzuzufügen?"
|
||||
},
|
||||
{
|
||||
"ABI_UI_BUILDPANEL_WORLDS_ERROR_UNITY_UNSUPPORTED",
|
||||
"Du nutzt eine Unity-Version, welche nicht mehr unterstützt wird. Bitte nutze Unity 2019.3.1f1 (das Verwenden vom Unity Hub erleichtert das Versions-Management)."
|
||||
},
|
||||
{"ABI_UI_BUILDPANEL_UPLOAD_WORLD_BUTTON", "Welt hochladen"},
|
||||
{"ABI_UI_BUILDPANEL_UPLOAD_AVATAR_BUTTON", "Avatar hochladen"},
|
||||
{"ABI_UI_BUILDPANEL_UPLOAD_PROP_BUTTON", "Prop hochladen"},
|
||||
{"ABI_UI_BUILDPANEL_FIX_IMPORT_SETTINGS", "Import-Einstellungen reparieren"},
|
||||
{"ABI_UI_BUILDPANEL_UTIL_REMOVE_MISSING_SCRIPTS_BUTTON", "Fehlende Scripts entfernen"},
|
||||
{"ABI_UI_BUILDPANEL_LOGIN_TEXT_USERNAME", "Benutzername"},
|
||||
{"ABI_UI_BUILDPANEL_LOGIN_TEXT_ACCESSKEY", "Zugangs-Schlüssel"},
|
||||
{
|
||||
"ABI_UI_BUILDPANEL_INFOTEXT_DOCUMENTATION",
|
||||
"Use our documentation to find out more about how to create content for our games. You will also find some handy tutorials on how to utilize most of the core engine features and core game features there."
|
||||
},
|
||||
{"ABI_UI_BUILDPANEL_INFOTEXT_SIGNIN1", "Bitte melde dich mit deinen CCK Daten an."},
|
||||
{"ABI_UI_BUILDPANEL_INFOTEXT_SIGNIN2", "Du findest diese auf hub.abinteractive.net."},
|
||||
{"ABI_UI_BUILDPANEL_INFOTEXT_SIGNIN3", "Bitte generiere einen CCK Schlüssel im Schlüssel Manager."},
|
||||
{"ABI_UI_BUILDPANEL_INFOTEXT_AUTHENTICATED_AS", "Angemeldet als"},
|
||||
{"ABI_UI_BUILDPANEL_INFOTEXT_USER_RANK", "API Benutzerrang"},
|
||||
{"ABI_UI_BUILDPANEL_SETTINGS_HEADER", "Upload Einstellungen"},
|
||||
{"ABI_UI_BUILDPANEL_SETTINGS_CONTENT_ENCRYPTION", "Wechsel die Verbindungs Verschlüsselung:"},
|
||||
{
|
||||
"ABI_UI_BUILDPANEL_SETTINGS_HINT_CONTENT_ENCRYPTION",
|
||||
"Wenn du Probleme mit dem Hochladen hast, versuche zu http zu wechseln."
|
||||
},
|
||||
{"ABI_UI_BUILDPANEL_SETTINGS_CONTENT_REGION", "Bevorzugte Upload Region:"},
|
||||
{
|
||||
"ABI_UI_BUILDPANEL_SETTINGS_HINT_CONTENT_REGION",
|
||||
"Du kannst deine Bevorzugte Upload Region wechseln um schneller hochzuladen. Wenn deine bevorzugte Region nicht verfügbar ist, wird automatisch eine andere verwendet. Dein Inhlat ist unabhängig von der Upload Region überall erreichbar."
|
||||
},
|
||||
{"ABI_UI_BUILDPANEL_SETTINGS_CCK_LANGUAGE", "CCK Sprache:"},
|
||||
{
|
||||
"ABI_UI_BUILDPANEL_SETTINGS_HINT_CCK_LANGUAGE",
|
||||
"Du kannst hier deine CCK Sprache ändern um die Benutzeroberfläche und Benachrichtigungen in deiner bevorzugten Sprache zu erhalten."
|
||||
},
|
||||
{
|
||||
"ABI_UI_BUILDPANEL_WARNING_FOLDERPATH",
|
||||
"Bitte verschiebe nicht den CCK oder CCK Mods Ordner. Dies führt zu Fehlern im CCK."
|
||||
},
|
||||
{
|
||||
"ABI_UI_BUILDPANEL_WARNING_FEEDBACK",
|
||||
"Möchtest du eine neue Funktion vorschlagen oder du hast einen Bug gefunden? Schreibe uns auf unserer Feedback Plattform!"
|
||||
},
|
||||
{"ABI_UI_BUILDPANEL_WARNING_MESH_FILTER_MESH_EMPTY", "Ein MeshFilter ohne Mesh wurde gefunden"},
|
||||
{
|
||||
"ABI_UI_BUILDPANEL_AVATAR_ERROR_ANIMATOR",
|
||||
"Es wurde kein Animator für diesen Avatar gefunden. Stell sicher, dass ein Animator auf dem selben GameObject wie die CVRAvatar Komponente vorhanden ist."
|
||||
},
|
||||
{
|
||||
"ABI_UI_BUILDPANEL_AVATAR_WARNING_GENERIC",
|
||||
"Dein Avatar Animator hat keinen Avatar gesetzt. Dein Avatar wird als generischer Avatar behandelt."
|
||||
},
|
||||
{
|
||||
"ABI_UI_BUILDPANEL_AVATAR_WARNING_POLYGONS",
|
||||
"Warnung: Dieser Avatar hat mehr als 100k ({x}) gesamt Polygone. Dies kan zu Leistungsproblemen im Spiel führen. Dies hindert dich nicht am Hochladen."
|
||||
},
|
||||
{
|
||||
"ABI_UI_BUILDPANEL_AVATAR_WARNING_SKINNED_MESH_RENDERERS",
|
||||
"Warnung: Dieser Avatar hat mehr als 10 ({x}) SkinnedMeshRenderer Komponenten. Dies kan zu Leistungsproblemen im Spiel führen. Dies hindert dich nicht am Hochladen."
|
||||
},
|
||||
{
|
||||
"ABI_UI_BUILDPANEL_AVATAR_WARNING_MATERIALS",
|
||||
"Warnung: Dieser Avatar hat mehr als 20 ({x}) Material Plätze. Dies kan zu Leistungsproblemen im Spiel führen. Dies hindert dich nicht am Hochladen."
|
||||
},
|
||||
{
|
||||
"ABI_UI_BUILDPANEL_AVATAR_WARNING_VIEWPOINT",
|
||||
"Warnung: Die Blick Position dieses Avatars liegt bei X=0,Y=0,Z=0. Das bedeutet die Blick Position liegt auf dem Boden. Dies ist warscheinlich nicht was du möchtest."
|
||||
},
|
||||
{"ABI_UI_BUILDPANEL_AVATAR_WARNING_NON_HUMANOID", "Warnung: Dein Avatar ist nicht als Humanoid eingestellt."},
|
||||
{
|
||||
"ABI_UI_BUILDPANEL_AVATAR_WARNING_LEGACY_BLENDSHAPES",
|
||||
"Warnung: Dieser Avatar wurde ohne \"legacy blend shape normals\" importiert. Dies wird zu einer größeren Dateigröße und Fehler beim Schattenwurf führen."
|
||||
},
|
||||
{
|
||||
"ABI_UI_BUILDPANEL_AVATAR_INFO_POLYGONS",
|
||||
"Info: Dieser Avatar hat mehr als 50k ({x}) gesamt Polygone. Dies kan zu Leistungsproblemen im Spiel führen. Dies hindert dich nicht am Hochladen."
|
||||
},
|
||||
{
|
||||
"ABI_UI_BUILDPANEL_AVATAR_INFO_SKINNED_MESH_RENDERERS",
|
||||
"Info: Dieser Avatar hat mehr als 5 ({x}) SkinnedMeshRenderer Komponenten. Dies kan zu Leistungsproblemen im Spiel führen. Dies hindert dich nicht am Hochladen."
|
||||
},
|
||||
{
|
||||
"ABI_UI_BUILDPANEL_AVATAR_INFO_MATERIALS",
|
||||
"Info: Dieser Avatar hat mehr als 10 ({x}) Material Plätze. Dies kan zu Leistungsproblemen im Spiel führen. Dies hindert dich nicht am Hochladen."
|
||||
},
|
||||
{
|
||||
"ABI_UI_BUILDPANEL_AVATAR_INFO_SMALL",
|
||||
"Info: Die Blick Position bei diesem Avatar liegt tiefer als 0.5 meter. Dieser Avatar sollte als übermäßig klein eingestuft werden"
|
||||
},
|
||||
{
|
||||
"ABI_UI_BUILDPANEL_AVATAR_INFO_HUGE",
|
||||
"Info: Die Blick Position bei diesem Avatar liegt höher als 3 meter. Dieser Avatar sollte als übermäßig groß eingestuft werden"
|
||||
},
|
||||
{"ABI_UI_BUILDPANEL_AVATAR_UPLOAD_BUTTON", "Avatar Hochladen"},
|
||||
{
|
||||
"ABI_UI_BUILDPANEL_PROPS_ERROR_MISSING_SCRIPT",
|
||||
"Das Requisit oder eines seiner unter Objekte enthält fehlende Skripte. Das Hochladen wird so fehlschlagen. Entferne diese Skripte vor dem Hochladen oder klicke den \"Entferne alle fehlenden Skripte\" Knopf, um dies automatisch zu erledigen."
|
||||
},
|
||||
{
|
||||
"ABI_UI_BUILDPANEL_PROPS_WARNING_POLYGONS",
|
||||
"Warnung: Dieses Requisit hat mehr als 100k ({x}) gesamt Polygone. Dies kan zu Leistungsproblemen im Spiel führen. Dies hindert dich nicht am Hochladen."
|
||||
},
|
||||
{
|
||||
"ABI_UI_BUILDPANEL_PROPS_WARNING_SKINNED_MESH_RENDERERS",
|
||||
"Warnung: Dieses Requisit hat mehr als 10 ({x}) SkinnedMeshRenderer Komponenten. Dies kan zu Leistungsproblemen im Spiel führen. Dies hindert dich nicht am Hochladen."
|
||||
},
|
||||
{
|
||||
"ABI_UI_BUILDPANEL_PROPS_WARNING_MATERIALS",
|
||||
"Warnung: Dieses Requisit hat mehr als 20 ({x}) Material Plätze. Dies kan zu Leistungsproblemen im Spiel führen. Dies hindert dich nicht am Hochladen."
|
||||
},
|
||||
{
|
||||
"ABI_UI_BUILDPANEL_PROPS_WARNING_LEGACY_BLENDSHAPES",
|
||||
"Warnung: Dieses Requisit wurde ohne \"legacy blend shape normals\" importiert. Dies wird zu einer größeren Dateigröße und Fehler beim Schattenwurf führen."
|
||||
},
|
||||
{
|
||||
"ABI_UI_BUILDPANEL_PROPS_INFO_POLYGONS",
|
||||
"Info: Dieses Requisit hat mehr als 50k ({x}) gesamt Polygone. Dies kan zu Leistungsproblemen im Spiel führen. Dies hindert dich nicht am Hochladen."
|
||||
},
|
||||
{
|
||||
"ABI_UI_BUILDPANEL_PROPS_INFO_SKINNED_MESH_RENDERERS",
|
||||
"Info: Dieses Requisit hat mehr als 5 ({x}) SkinnedMeshRenderer Komponenten. Dies kan zu Leistungsproblemen im Spiel führen. Dies hindert dich nicht am Hochladen."
|
||||
},
|
||||
{
|
||||
"ABI_UI_BUILDPANEL_PROPS_INFO_MATERIALS",
|
||||
"Info: Dieses Requisit hat mehr als 10 ({x}) Material Plätze. Dies kan zu Leistungsproblemen im Spiel führen. Dies hindert dich nicht am Hochladen."
|
||||
},
|
||||
{"ABI_UI_BUILDPANEL_PROPS_UPLOAD_BUTTON", "Requisit (Prop) hochladen"},
|
||||
{
|
||||
"ABI_UI_BUILDPANEL_ERROR_WORLD_MISSING_SCRIPTS",
|
||||
"Die Szene enthält fehlende Skripte. Das Hochladen wird so fehlschlagen. Entferne diese Skripte vor dem Hochladen oder klicke den \"Entferne alle fehlenden Skripte\" Knopf, um dies automatisch zu erledigen."
|
||||
},
|
||||
{
|
||||
"ABI_UI_BUILDPANEL_ERROR_AVATAR_MISSING_SCRIPTS",
|
||||
"Der Avatar oder eines seiner unter Objekte enthält fehlende Skripte. Das Hochladen wird so fehlschlagen. Entferne diese Skripte vor dem Hochladen oder klicke den \"Entferne alle fehlenden Skripte\" Knopf, um dies automatisch zu erledigen."
|
||||
},
|
||||
{
|
||||
"ABI_UI_ADVAVTR_TRIGGER_MULTIPLE_TRIGGER_HELPBOX",
|
||||
"Mehrere \"Trigger\" auf dem selben GameObject führen zu unvorhersehbarem Verhalten."
|
||||
},
|
||||
{
|
||||
"ABI_UI_ADVAVTR_TRIGGER_ALLOWED_POINTERS_HELPBOX",
|
||||
"Wenn Pointer zu der \"Allowed Pointers\" Liste hinzugefügt werden, Werden alle pointer ignoriert, die nicht in der Liste sind."
|
||||
},
|
||||
{
|
||||
"ABI_UI_ADVAVTR_TRIGGER_ALLOWED_TYPES_HELPBOX",
|
||||
"Wenn Typen zu der \"Allowed Types\" Liste hinzugefügt werden, Werden alle pointer ignoriert, die nicht einen der angegebenen Typen haben."
|
||||
},
|
||||
{
|
||||
"ABI_UI_ADVAVTR_TRIGGER_PARTICLE_HELPBOX",
|
||||
"Wenn diese Option ausgewählt ist, reagiert der Trigger mit dem \"On Enter Trigger\" auch auf Partikel Systeme, die einen Pointer besitzen."
|
||||
},
|
||||
{
|
||||
"ABI_UI_INFOTEXT_WORLDS_NO_AVATARS",
|
||||
"Ein ChilloutVR World Objekt wurde in der Scene gefunden. Avatare können nicht hochgeladen werden, bis das World Objekt entfernt wurde. Avatars und Requisiten werden teil der Welt sein, wenn sie nicht entfernt oder ausgeschaltet werden."
|
||||
},
|
||||
{
|
||||
"ABI_UI_ASSET_INFO_HEADER_INFORMATION",
|
||||
"Dieses Skript speichert die Meta Daten des Objekts. Bearbeite nicht diese Daten, wenn du nicht weißt was du tust. Um einen Avatar erneut hochzuladen, entferne die Objekt ID und lade neu hoch."
|
||||
},
|
||||
{"ABI_UI_ASSET_INFO_GUID_LABEL", "Die aktuell gespeicherte Objekt ID ist: "},
|
||||
{"ABI_UI_ASSET_INFO_DETACH_BUTTON", "Entferne Objekt ID"},
|
||||
{"ABI_UI_ASSET_INFO_DETACH_BUTTON_DIALOG_TITLE", "Entferne Objekt ID vom Asset Info Manager"},
|
||||
{
|
||||
"ABI_UI_ASSET_INFO_DETACH_BUTTON_DIALOG_BODY",
|
||||
"Die Objekt ID wird vom Objekt gelöst. Dies bedeutet, dass der Inhalt neu hochgeladen wird. Fortsetzen?"
|
||||
},
|
||||
{"ABI_UI_ASSET_INFO_DETACH_BUTTON_DIALOG_ACCEPT", "Ja!"},
|
||||
{"ABI_UI_ASSET_INFO_DETACH_BUTTON_DIALOG_DENY", "Nein!"},
|
||||
{"ABI_UI_ASSET_INFO_COPY_BUTTON", "Kopiere Objekt ID"},
|
||||
{"ABI_UI_ASSET_INFO_ATTACH_LABEL", "Objekt ID"},
|
||||
{
|
||||
"ABI_UI_ASSET_INFO_ATTACH_INFO",
|
||||
"Du musst keine neue Objekt ID hinzufügen, wenn du keinen ALten Inhalt aktualisieren möchtest. Eine neue ID wird generiert, wenn keine vorhanden ist."
|
||||
},
|
||||
{"ABI_UI_ASSET_INFO_ATTACH_BUTTON", "Objekt ID setzen"},
|
||||
{
|
||||
"ABI_UI_AVATAR_INFO_VIEWPOINT",
|
||||
"Dieser Punkt kontroliert die Kamera Position. Er sollte zwischen den Augen liegen."
|
||||
},
|
||||
{
|
||||
"ABI_UI_AVATAR_INFO_VOICE_POSITION",
|
||||
"Dieser Punkt kontroliert die Audio Position. Er sollte beim Mund liegen."
|
||||
},
|
||||
{
|
||||
"ABI_UI_AVATAR_INFO_OVERRIDE_CONTROLLER",
|
||||
"Damit die Animationen richtig funktionieren, stell sicher, dass der richtige animator in dem override controller zugewiesen ist. Einen beispiel Controller findest du im CCK Prefab Ordner."
|
||||
},
|
||||
{
|
||||
"ABI_UI_AVATAR_INFO_BLinking",
|
||||
"Blinzel blend shapes müssen nicht verwendet werden. Wenn eingeschaltet, werden zur Laufzeit zufällige intervalle generiert."
|
||||
},
|
||||
{
|
||||
"ABI_UI_AVATAR_INFO_EYE_MOVEMENT",
|
||||
"Wenn diese Option eingeschalten ist, werden sie die die Augen nahezu realistisch bewegen."
|
||||
},
|
||||
{
|
||||
"ABI_UI_AVATAR_INFO_EYE_VISEMES",
|
||||
"Damit die automatische viseme erkennung funktioniert, musst du zuerst das Mesh des Gesichtes auswählen. Dieses ist das Mesh mit dem namen \"body\" in den meisten Fällen."
|
||||
},
|
||||
{
|
||||
"ABI_UI_MODULE_WORKSHOP_MISSING_DEPENDENCIES_TITLE",
|
||||
"Es fehlt eine Voraussätzungen im Projekt."
|
||||
},
|
||||
{
|
||||
"ABI_UI_MODULE_WORKSHOP_MISSING_DEPENDENCIES_WARNING_PREFACE",
|
||||
"Die folgenden Voraussetzungen sind nicht erfüllt"
|
||||
},
|
||||
{
|
||||
"ABI_UI_MODULE_WORKSHOP_MISSING_DEPENDENCIES_FINAL_WARNING",
|
||||
"Bitte installiere alle Voraussetzungen, bevor du dieses Modul installierst!"
|
||||
},
|
||||
{
|
||||
"ABI_UI_MODULE_WORKSHOP_MISSING_DEPENDENCIES_DIALOG_ACCEPT",
|
||||
"Verstanden"
|
||||
},
|
||||
{ "ABI_UI_BUILD_RUNTIME_HEADER", "Lade Inhalt zu ChilloutVR hoch" },
|
||||
{ "ABI_UI_BUILD_RUNTIME_BTN_NEXT", "Weiter zum nächsten Schritt" },
|
||||
{ "ABI_UI_BUILD_RUNTIME_BTN_PREV", "Zurück zum voherigen Schritt" },
|
||||
{ "ABI_UI_BUILD_RUNTIME_BTN_NEW_PICTURE", "Bild ersetzen" },
|
||||
{ "ABI_UI_BUILDSTEP_FILTERTAGS", "Filter Tags" },
|
||||
{ "ABI_UI_BUILDSTEP_DETAILS", "Details" },
|
||||
{ "ABI_UI_BUILDSTEP_LEGAL", "Rechtliche Bestätigung" },
|
||||
{ "ABI_UI_BUILDSTEP_UPLOAD", "Inhalt hochladen" },
|
||||
{ "ABI_UI_BUILDSTEP_DETAILS_NAME_ROW", "Name:" },
|
||||
{ "ABI_UI_BUILDSTEP_DETAILS_DESC_ROW", "Beschreibung:" },
|
||||
{ "ABI_UI_BUILDSTEP_DETAILS_NAME_PLACEHOLDER", "Objekt Name (benötigt!)" },
|
||||
{ "ABI_UI_BUILDSTEP_DETAILS_DESC_PLACEHOLDER", "Objekt Beschreibung" },
|
||||
{ "ABI_UI_BUILDSTEP_DETAILS_CHANGELOG_PLACEHOLDER", "Objekt Änderungen - Sage uns, was du geändert oder hinzugefügt hast" },
|
||||
{
|
||||
"ABI_UI_BUILDSTEP_DETAILS_WARNING_NEW_OBJECT",
|
||||
"Dieses Objekt wird zum ersten mal hochgeldaen. Dabei muss ein Bild hochgeladen werden. Es gibt keine Option das Objekt ohne Bild hochzuladen."
|
||||
},
|
||||
{
|
||||
"ABI_UI_BUILDSTEP_DETAILS_WARNING_UPDATING_OBJECT",
|
||||
"Du bist dabei dieses Objekt zu aktualisieren. Die Beschreibung oder den Namen kannst du nicht während des aktualisieren ändern. Besuche hier für bitte den Hub."
|
||||
},
|
||||
{
|
||||
"ABI_UI_BUILDSTEP_DETAILS_SET_ACTIVE_FILE",
|
||||
"Markieren diesen Stand als den aktuell verwendeten für die aktuelle Plattform"
|
||||
},
|
||||
{
|
||||
"ABI_UI_BUILDSTEP_DETAILS_LEGAL_PERMISSION",
|
||||
"Ich bestätige hiermit, dass der von mir hochgeladene Inhalt mir gehört oder ich entsprechende Nutzungslizenzen besitze. Ich weiß, dass das Hochladen von Kopiergeschützung Inhalten ohne die Zustimmung des Authors zu rechtlichen Konsequenzen und Beschränkungen meines Benutzerkontos führen können. Ich weiß, dass ich mich an die Inhalts erstellungs Regeln, die in den Konditiotionen von Alpha Blend Interactive geschrieben stehen halten muss."
|
||||
},
|
||||
{
|
||||
"ABI_UI_BUILDSTEP_DETAILS_LEGAL_TAGS",
|
||||
"Ich bestätige hiermit, dass ich meine Inhalt mit den korrekten Tags versehen habe. I weiß, das das bewusste fälschliche Taggen ein Schwerer Regelverstoß ist. Ich weiß, das mein Account dafür gestraft werden kann, dass ich bewusst falsche Tags setze."
|
||||
},
|
||||
{
|
||||
"ABI_UI_BUILDSTEP_UPLOAD_STEP_DETAILS",
|
||||
"Dein Inhalt wird zu unserem Netzwerk hochgeladen. Der Prozess ist in mehrere Schritte unterteilt. Nachdem der Inhalt zu unserem Netzwerk hochgeladen wurde, wird dieser automatisch auf sicherheitsrisiken überprüft. Wenn der Inhalt diese Tests bestanden hat, wird der Inhalt verschlüsselt und auf unserCDN Netzwerk verteilt. Du kannst den aktuelle Status unten sehen."
|
||||
},
|
||||
{
|
||||
"ABI_UI_BUILDSTEP_UPLOAD_DETAILS_MISSING",
|
||||
"Um Inhalt auf unsere Plattform hochzuladen, muss ein Name vergeben werden. Wenn du ein Objekt neu hochlädst, stell sicher, dass du einen sprechenden namen vergibst. Du wirst nun zurück zur Detailseite geleitet um einen Namen zu vergeben."
|
||||
},
|
||||
{
|
||||
"ABI_UI_BUILDSTEP_UPLOAD_LEGAL_MISSING",
|
||||
"Um Inhalt auf unsere Plattform hochzuladen, musst du die Berechtigung haben diesen Inhalt hochladen zu dürfen und musst die Tags richtig setzen. Du wirst nun zur Rechtlichen Seite zurückgeleitet um die Rechtliche Bestätigung zu bestätigen."
|
||||
},
|
||||
{ "ABI_UI_DETAILS_HEAD_CHANGELOG", "Inhalts Änderungen" },
|
||||
{ "ABI_UI_DETAILS_HEAD_STATISTICS", "Datei Statistiken" },
|
||||
{ "ABI_UI_LEGAL_HEAD_OWNERSHIP", "Rechtliche Bestätigung: Eigentum & Urheberrechte" },
|
||||
{ "ABI_UI_LEGAL_HEAD_TAGS", "Rechtliche Bestätigung: Tagging" },
|
||||
{ "ABI_UI_TAGS_HEADER_AUDIO", "Hörbare Erfahrung" },
|
||||
{ "ABI_UI_TAGS_HEADER_VISUAL", "Visuelle Erfahrung" },
|
||||
{ "ABI_UI_TAGS_HEADER_CONTENT", "Inhalt" },
|
||||
{ "ABI_UI_TAGS_HEADER_NSFW", "Altersbeschränkung" },
|
||||
{ "ABI_UI_TAGS_LOUD_AUDIO", "Lauter Klang" },
|
||||
{ "ABI_UI_TAGS_LR_AUDIO", "Weit reichender Klang" },
|
||||
{ "ABI_UI_TAGS_SPAWN_AUDIO", "Erscheinings Klang" },
|
||||
{ "ABI_UI_TAGS_CONTAINS_MUSIC", "Enthält Musik" },
|
||||
{ "ABI_UI_TAGS_FLASHING_COLORS", "Blitzende Farben" },
|
||||
{ "ABI_UI_TAGS_FLASHING_LIGHTS", "Blitzende Lichter" },
|
||||
{ "ABI_UI_TAGS_EXTREMELY_BRIGHT", "Sehr Hell" },
|
||||
{ "ABI_UI_TAGS_SCREEN_EFFECTS", "Bildschirmeffekte" },
|
||||
{ "ABI_UI_TAGS_PARTICLE_SYSTEMS", "Partikel Systeme" },
|
||||
{ "ABI_UI_TAGS_VIOLENCE", "Gewalt" },
|
||||
{ "ABI_UI_TAGS_GORE", "Blut und Eingeweide" },
|
||||
{ "ABI_UI_TAGS_HORROR", "Grusel" },
|
||||
{ "ABI_UI_TAGS_JUMPSCARE", "Jumpscare" },
|
||||
{ "ABI_UI_TAGS_HUGE", "Extrem Groß" },
|
||||
{ "ABI_UI_TAGS_SMALL", "Extrem Klein" },
|
||||
{ "ABI_UI_TAGS_SUGGESTIVE", "anzüglich" },
|
||||
{ "ABI_UI_TAGS_NUDITY", "Nacktheit" },
|
||||
{ "ABI_UI_API_RESPONSE_HEAD", "Aktueller Status" },
|
||||
{ "ABI_UI_API_RESPONSES_UPLOADED", "Datei ist hochgeladen. Sie wird nun weiterverarbeitet." },
|
||||
{ "ABI_UI_API_RESPONSES_SECURITY_CHECKING", "Dein Inhalt wird gerade von unserem Sicherheitssystem überprüft." },
|
||||
{ "ABI_UI_API_RESPONSES_ENCRYPTING", "Dein Inhalt wird gerade verschlüsselt." },
|
||||
{ "ABI_UI_API_RESPONSES_PUSHING", "Die Überprüfungen sind vollständig. Dein Inhalt wird gerade zu unserem Speichernetwerk übertragen." },
|
||||
{ "ABI_UI_API_RESPONSES_FINISHED", "Übertragung vollständig. Dein Inhalt ist jetzt im Spiel verfügbar." },
|
||||
};
|
||||
}
|
||||
}
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Add a link
Reference in a new issue