Initialer Upload neues Unity-Projekt

This commit is contained in:
Daniel Ocks
2025-07-21 09:11:14 +02:00
commit eeca72985b
14558 changed files with 1508140 additions and 0 deletions

View File

@ -0,0 +1,98 @@
/*
* Copyright (c) Meta Platforms, Inc. and affiliates.
* All rights reserved.
*
* Licensed under the Oculus SDK License Agreement (the "License");
* you may not use the Oculus SDK except in compliance with the License,
* which is provided at the time of installation or download, or which
* otherwise accompanies this software in either electronic or hard copy form.
*
* You may obtain a copy of the License at
*
* https://developer.oculus.com/licenses/oculussdk/
*
* Unless required by applicable law or agreed to in writing, the Oculus SDK
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
using Meta.Voice.VSDKHub;
using UnityEngine;
using UnityEditor;
using Meta.WitAi.Windows;
using Meta.WitAi.Data.Entities;
using Meta.WitAi.TTS;
using Meta.WitAi.TTS.Preload;
namespace Oculus.Voice.Utility
{
public static class VoiceSDKMenu
{
#region WINDOWS
[MenuItem("Oculus/Voice SDK/Get Started", false, 1)]
private static void OpenConfigurationWindow()
{
WitWindowUtility.OpenGettingStarted((config) =>
{
VoiceSDKHub.ShowPage(VoiceSDKHub.GetPageId(VoiceHubConstants.PAGE_WIT_CONFIGS));
});
}
[MenuItem("Oculus/Voice SDK/Understanding Viewer", false, 200)]
private static void OpenUnderstandingWindow()
{
WitWindowUtility.OpenUnderstandingWindow();
}
#endregion
#region Scriptable Objects
[MenuItem("Assets/Create/Voice SDK/Dynamic Entities")]
public static void CreateDynamicEntities()
{
WitDynamicEntitiesData asset =
ScriptableObject.CreateInstance<WitDynamicEntitiesData>();
var path = EditorUtility.SaveFilePanel("Save Dynamic Entity", Application.dataPath,
"DynamicEntities", "asset");
if (!string.IsNullOrEmpty(path))
{
path = "Assets/" + path.Replace(Application.dataPath, "");
AssetDatabase.CreateAsset(asset, path);
AssetDatabase.SaveAssets();
EditorUtility.FocusProjectWindow();
Selection.activeObject = asset;
}
}
#endregion
#region TTS
[MenuItem("Assets/Create/Voice SDK/TTS/Add Default TTS Setup")]
public static void CreateDefaultTTSSetup()
{
TTSEditorUtilities.CreateDefaultSetup();
}
[MenuItem("Assets/Create/Voice SDK/TTS/Add TTS Service to Scene", false, 100)]
public static void CreateTTSService()
{
TTSEditorUtilities.CreateService();
}
[MenuItem("Assets/Create/Voice SDK/TTS/Add TTS Speaker to Scene", false, 100)]
public static void CreateTTSSpeaker()
{
TTSEditorUtilities.CreateSpeaker();
}
[MenuItem("Assets/Create/Voice SDK/TTS/Preload Settings", false, 200)]
public static void CreateTTSPreloadSettings()
{
TTSPreloadUtility.CreatePreloadSettings();
}
#endregion
}
}

View File

@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: edfc5f7f2010aa340af1f2b286930dc6
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,82 @@
/*
* Copyright (c) Meta Platforms, Inc. and affiliates.
* All rights reserved.
*
* Licensed under the Oculus SDK License Agreement (the "License");
* you may not use the Oculus SDK except in compliance with the License,
* which is provided at the time of installation or download, or which
* otherwise accompanies this software in either electronic or hard copy form.
*
* You may obtain a copy of the License at
*
* https://developer.oculus.com/licenses/oculussdk/
*
* Unless required by applicable law or agreed to in writing, the Oculus SDK
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
using System;
using UnityEngine;
using Meta.WitAi;
namespace Oculus.Voice.Utility
{
public static class VoiceSDKStyles
{
[Serializable]
public struct VoiceSDKTexts
{
[Header("Setup Texts")]
public string SetupTitleLabel;
public string SetupHeaderLabel;
public string SetupSubheaderLabel;
public string SetupLanguageLabel;
public string VoiceDocsUrl;
[Header("About Texts")]
public string AboutTitleLabel;
public string AboutCloseLabel;
public string AboutVoiceSdkVersionLabel;
public string AboutWitSdkVersionLabel;
public string AboutWitApiVersionLabel;
public string AboutTutorialButtonLabel;
public string AboutTutorialButtonUrl;
[Header("Settings Texts")]
public string SettingsTitleLabel;
[Header("Understanding Viewer Texts")]
public string UnderstandingViewerTitleLabel;
[Header("Built-In Texts")]
public string BuiltInAppBtnLabel;
public string BuiltInAppUrl;
}
public static VoiceSDKTexts Texts;
public static Texture2D MainHeader;
public static GUIContent SetupTitle;
public static GUIContent AboutTitle;
public static GUIContent SettingsTitle;
public static GUIContent UnderstandingTitle;
static VoiceSDKStyles()
{
// Load localization
string languageID = "en-us";
string textFilePath = $"voicesdk_texts_{languageID}";
TextAsset textAsset = Resources.Load<TextAsset>(textFilePath);
if (textAsset == null)
{
VLog.E($"VoiceSDK Texts - Add localization to Resources/{textFilePath}\nLanguage: {languageID}");
return;
}
Texts = JsonUtility.FromJson<VoiceSDKTexts>(textAsset.text);
MainHeader = (Texture2D) Resources.Load("voicesdk_heroart");
SetupTitle = new GUIContent(Texts.SetupTitleLabel);
AboutTitle = new GUIContent(Texts.AboutTitleLabel);
SettingsTitle = new GUIContent(Texts.SettingsTitleLabel);
UnderstandingTitle = new GUIContent(Texts.UnderstandingViewerTitleLabel);
}
}
}

View File

@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: fa1f0af066e824a31875bc815a72cc5c
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,35 @@
/*
* Copyright (c) Meta Platforms, Inc. and affiliates.
* All rights reserved.
*
* Licensed under the Oculus SDK License Agreement (the "License");
* you may not use the Oculus SDK except in compliance with the License,
* which is provided at the time of installation or download, or which
* otherwise accompanies this software in either electronic or hard copy form.
*
* You may obtain a copy of the License at
*
* https://developer.oculus.com/licenses/oculussdk/
*
* Unless required by applicable law or agreed to in writing, the Oculus SDK
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
using System;
using Oculus.VoiceSDK;
using UnityEngine;
namespace Oculus.Voice.Utility
{
/// <summary>
/// Obsolete class for editor version info
/// </summary>
public class VoiceSDKVersion : MonoBehaviour
{
[Obsolete("Use 'VoiceSDKConstants.SdkVersion' directly")]
public static string VERSION => VoiceSDKConstants.SdkVersion;
}
}

View File

@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 5bf6b7b99e36e104f964fb70253f847c
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant: