├── ProjectSettings ├── boot.config ├── ProjectVersion.txt ├── ClusterInputManager.asset ├── PresetManager.asset ├── EditorBuildSettings.asset ├── VersionControlSettings.asset ├── TimeManager.asset ├── PythonSettings.asset ├── VFXManager.asset ├── AudioManager.asset ├── TagManager.asset ├── PackageManagerSettings.asset ├── UnityConnectSettings.asset ├── MemorySettings.asset ├── DynamicsManager.asset ├── EditorSettings.asset ├── NavMeshAreas.asset ├── Physics2DSettings.asset ├── GraphicsSettings.asset ├── InputManager.asset ├── QualitySettings.asset └── ProjectSettings.asset ├── Assets ├── IntegrationGPT │ ├── Config~ │ │ ├── new_bing_cookies.json │ │ ├── google_bard_config.json │ │ ├── new_bing_config.json │ │ └── chat_gpt_config.json │ ├── gpt.py.meta │ ├── Editor.meta │ ├── Editor │ │ ├── UnityEditor.IntegrationGPT.Editor.asmdef.meta │ │ ├── Evaluator.cs.meta │ │ ├── GPTWindow.cs.meta │ │ ├── Inspector.cs.meta │ │ ├── UnityEditor.IntegrationGPT.Editor.asmdef │ │ ├── Evaluator.cs │ │ ├── Inspector.cs │ │ └── GPTWindow.cs │ └── gpt.py └── IntegrationGPT.meta ├── Screenshots ├── bard.gif ├── binggpt.gif ├── chatgpt.gif ├── image-20230324020733689.png ├── image-20230324021009501.png └── image-20230324021128716.png ├── .vsconfig ├── Packages ├── manifest.json └── packages-lock.json ├── .gitignore ├── README.md ├── README_EN.md └── LICENSE /ProjectSettings/boot.config: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /Assets/IntegrationGPT/Config~/new_bing_cookies.json: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /Screenshots/bard.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tylearymf/UniGPT/HEAD/Screenshots/bard.gif -------------------------------------------------------------------------------- /Screenshots/binggpt.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tylearymf/UniGPT/HEAD/Screenshots/binggpt.gif -------------------------------------------------------------------------------- /Screenshots/chatgpt.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tylearymf/UniGPT/HEAD/Screenshots/chatgpt.gif -------------------------------------------------------------------------------- /ProjectSettings/ProjectVersion.txt: -------------------------------------------------------------------------------- 1 | m_EditorVersion: 2021.3.12f1 2 | m_EditorVersionWithRevision: 2021.3.12f1 (8af3c3e441b1) 3 | -------------------------------------------------------------------------------- /.vsconfig: -------------------------------------------------------------------------------- 1 | { 2 | "version": "1.0", 3 | "components": [ 4 | "Microsoft.VisualStudio.Workload.ManagedGame" 5 | ] 6 | } 7 | -------------------------------------------------------------------------------- /Screenshots/image-20230324020733689.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tylearymf/UniGPT/HEAD/Screenshots/image-20230324020733689.png -------------------------------------------------------------------------------- /Screenshots/image-20230324021009501.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tylearymf/UniGPT/HEAD/Screenshots/image-20230324021009501.png -------------------------------------------------------------------------------- /Screenshots/image-20230324021128716.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tylearymf/UniGPT/HEAD/Screenshots/image-20230324021128716.png -------------------------------------------------------------------------------- /Assets/IntegrationGPT/Config~/google_bard_config.json: -------------------------------------------------------------------------------- 1 | { 2 | "session": "", 3 | "proxy": "", 4 | "prompts":{ 5 | "Chat": "" 6 | } 7 | } -------------------------------------------------------------------------------- /ProjectSettings/ClusterInputManager.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!236 &1 4 | ClusterInputManager: 5 | m_ObjectHideFlags: 0 6 | m_Inputs: [] 7 | -------------------------------------------------------------------------------- /ProjectSettings/PresetManager.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!1386491679 &1 4 | PresetManager: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 2 7 | m_DefaultPresets: {} 8 | -------------------------------------------------------------------------------- /Assets/IntegrationGPT/gpt.py.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 908697856f548c640acf3bdd3ed7e219 3 | DefaultImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /Assets/IntegrationGPT.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: f1bee5b5d59629a49aadc00c824cdb97 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /ProjectSettings/EditorBuildSettings.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!1045 &1 4 | EditorBuildSettings: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 2 7 | m_Scenes: [] 8 | m_configObjects: {} 9 | -------------------------------------------------------------------------------- /Assets/IntegrationGPT/Editor.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: c00a3fa48f67f17469e74b7a56cd2d92 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/IntegrationGPT/Editor/UnityEditor.IntegrationGPT.Editor.asmdef.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: fd90709d7d4244d498f1611e3f85ce63 3 | AssemblyDefinitionImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /ProjectSettings/VersionControlSettings.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!890905787 &1 4 | VersionControlSettings: 5 | m_ObjectHideFlags: 0 6 | m_Mode: Visible Meta Files 7 | m_CollabEditorSettings: 8 | inProgressEnabled: 1 9 | -------------------------------------------------------------------------------- /ProjectSettings/TimeManager.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!5 &1 4 | TimeManager: 5 | m_ObjectHideFlags: 0 6 | Fixed Timestep: 0.02 7 | Maximum Allowed Timestep: 0.33333334 8 | m_TimeScale: 1 9 | Maximum Particle Timestep: 0.03 10 | -------------------------------------------------------------------------------- /Assets/IntegrationGPT/Editor/Evaluator.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: ec65e59d4b1611045b65aac2b640aff2 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Assets/IntegrationGPT/Editor/GPTWindow.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: c593802bc0eccf041b76e463ad841479 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Assets/IntegrationGPT/Editor/Inspector.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 64582950e1d8c274eafde6ff1ac402fe 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Packages/manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "dependencies": { 3 | "com.unity.code-analysis": "0.1.0-preview.2", 4 | "com.unity.ide.visualstudio": "2.0.16", 5 | "com.unity.ide.vscode": "1.2.5", 6 | "com.unity.nuget.newtonsoft-json": "3.0.2", 7 | "com.unity.scripting.python": "7.0.0", 8 | "com.unity.ugui": "1.0.0" 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /ProjectSettings/PythonSettings.asset: -------------------------------------------------------------------------------- 1 | { 2 | "MonoBehaviour": { 3 | "m_Enabled": true, 4 | "m_EditorHideFlags": 0, 5 | "m_Name": "", 6 | "m_EditorClassIdentifier": "", 7 | "m_sitePackages": [ 8 | "Assets/site-packages", 9 | "Assets/IntegrationGPT" 10 | ] 11 | } 12 | } -------------------------------------------------------------------------------- /Assets/IntegrationGPT/Config~/new_bing_config.json: -------------------------------------------------------------------------------- 1 | { 2 | "style": "precise", 3 | "proxy": "", 4 | "api_url": "", 5 | "cookie_path": "new_bing_cookies.json", 6 | "prompts": { 7 | "聊天": "", 8 | "生成并执行代码": "我想让你在Unity里面实现一个需求, 然后你给我回复代码, 你需要将实现逻辑写在TemplateClass中的Test静态方法里面, 并正确引用命名空间, 我希望我不需要设置任何东西, 只手动调用Test方法后就能得到正确的结果,我希望你只回复代码, 而不是其他任何内容, 不要注释.\n我的第一个需求是\n" 9 | } 10 | } -------------------------------------------------------------------------------- /Assets/IntegrationGPT/Config~/chat_gpt_config.json: -------------------------------------------------------------------------------- 1 | { 2 | "api_key": "sk-xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx", 3 | "model": "gpt-3.5-turbo", 4 | "proxy": "", 5 | "api_url": "", 6 | "prompts": { 7 | "聊天": "", 8 | "生成并执行代码": "我想让你在Unity里面实现一个需求, 然后你给我回复代码, 你需要将实现逻辑写在TemplateClass中的Test静态方法里面, 我希望我不需要设置任何东西, 只手动调用Test方法后就能得到正确的结果, 我希望你只回复代码, 而不是其他任何内容, 不要注释.\n我的第一个需求是\n" 9 | } 10 | } -------------------------------------------------------------------------------- /ProjectSettings/VFXManager.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!937362698 &1 4 | VFXManager: 5 | m_ObjectHideFlags: 0 6 | m_IndirectShader: {fileID: 0} 7 | m_CopyBufferShader: {fileID: 0} 8 | m_SortShader: {fileID: 0} 9 | m_StripUpdateShader: {fileID: 0} 10 | m_RenderPipeSettingsPath: 11 | m_FixedTimeStep: 0.016666668 12 | m_MaxDeltaTime: 0.05 13 | m_CompiledVersion: 0 14 | m_RuntimeVersion: 0 15 | m_RuntimeResources: {fileID: 0} 16 | -------------------------------------------------------------------------------- /ProjectSettings/AudioManager.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!11 &1 4 | AudioManager: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 2 7 | m_Volume: 1 8 | Rolloff Scale: 1 9 | Doppler Factor: 1 10 | Default Speaker Mode: 2 11 | m_SampleRate: 0 12 | m_DSPBufferSize: 1024 13 | m_VirtualVoiceCount: 512 14 | m_RealVoiceCount: 32 15 | m_EnableOutputSuspension: 1 16 | m_SpatializerPlugin: 17 | m_AmbisonicDecoderPlugin: 18 | m_DisableAudio: 0 19 | m_VirtualizeEffects: 1 20 | m_RequestedDSPBufferSize: 0 21 | -------------------------------------------------------------------------------- /ProjectSettings/TagManager.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!78 &1 4 | TagManager: 5 | serializedVersion: 2 6 | tags: [] 7 | layers: 8 | - Default 9 | - TransparentFX 10 | - Ignore Raycast 11 | - 12 | - Water 13 | - UI 14 | - 15 | - 16 | - 17 | - 18 | - 19 | - 20 | - 21 | - 22 | - 23 | - 24 | - 25 | - 26 | - 27 | - 28 | - 29 | - 30 | - 31 | - 32 | - 33 | - 34 | - 35 | - 36 | - 37 | - 38 | - 39 | - 40 | m_SortingLayers: 41 | - name: Default 42 | uniqueID: 0 43 | locked: 0 44 | -------------------------------------------------------------------------------- /ProjectSettings/PackageManagerSettings.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!114 &1 4 | MonoBehaviour: 5 | m_ObjectHideFlags: 61 6 | m_CorrespondingSourceObject: {fileID: 0} 7 | m_PrefabInstance: {fileID: 0} 8 | m_PrefabAsset: {fileID: 0} 9 | m_GameObject: {fileID: 0} 10 | m_Enabled: 1 11 | m_EditorHideFlags: 0 12 | m_Script: {fileID: 13964, guid: 0000000000000000e000000000000000, type: 0} 13 | m_Name: 14 | m_EditorClassIdentifier: 15 | m_EnablePreReleasePackages: 0 16 | m_EnablePackageDependencies: 0 17 | m_AdvancedSettingsExpanded: 1 18 | m_ScopedRegistriesSettingsExpanded: 1 19 | m_SeeAllPackageVersions: 0 20 | oneTimeWarningShown: 0 21 | m_Registries: 22 | - m_Id: main 23 | m_Name: 24 | m_Url: https://packages.unity.com 25 | m_Scopes: [] 26 | m_IsDefault: 1 27 | m_Capabilities: 7 28 | m_UserSelectedRegistryName: 29 | m_UserAddingNewScopedRegistry: 0 30 | m_RegistryInfoDraft: 31 | m_Modified: 0 32 | m_ErrorMessage: 33 | m_UserModificationsInstanceId: -888 34 | m_OriginalInstanceId: -890 35 | m_LoadAssets: 0 36 | -------------------------------------------------------------------------------- /ProjectSettings/UnityConnectSettings.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!310 &1 4 | UnityConnectSettings: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 1 7 | m_Enabled: 0 8 | m_TestMode: 0 9 | m_EventOldUrl: https://api.uca.cloud.unity3d.com/v1/events 10 | m_EventUrl: https://cdp.cloud.unity3d.com/v1/events 11 | m_ConfigUrl: https://config.uca.cloud.unity3d.com 12 | m_DashboardUrl: https://dashboard.unity3d.com 13 | m_TestInitMode: 0 14 | CrashReportingSettings: 15 | m_EventUrl: https://perf-events.cloud.unity3d.com 16 | m_Enabled: 0 17 | m_LogBufferSize: 10 18 | m_CaptureEditorExceptions: 1 19 | UnityPurchasingSettings: 20 | m_Enabled: 0 21 | m_TestMode: 0 22 | UnityAnalyticsSettings: 23 | m_Enabled: 0 24 | m_TestMode: 0 25 | m_InitializeOnStartup: 1 26 | m_PackageRequiringCoreStatsPresent: 0 27 | UnityAdsSettings: 28 | m_Enabled: 0 29 | m_InitializeOnStartup: 1 30 | m_TestMode: 0 31 | m_IosGameId: 32 | m_AndroidGameId: 33 | m_GameIds: {} 34 | m_GameId: 35 | PerformanceReportingSettings: 36 | m_Enabled: 0 37 | -------------------------------------------------------------------------------- /Assets/IntegrationGPT/Editor/UnityEditor.IntegrationGPT.Editor.asmdef: -------------------------------------------------------------------------------- 1 | { 2 | "name": "UnityEditor.IntegrationGPT", 3 | "rootNamespace": "", 4 | "references": [ 5 | "GUID:abd0983879a76104092bd43f426472fc" 6 | ], 7 | "includePlatforms": [ 8 | "Editor" 9 | ], 10 | "excludePlatforms": [], 11 | "allowUnsafeCode": false, 12 | "overrideReferences": true, 13 | "precompiledReferences": [ 14 | "Python.Runtime.dll", 15 | "Microsoft.CodeAnalysis.CSharp.dll", 16 | "Microsoft.CodeAnalysis.CSharp.Workspaces.dll", 17 | "Microsoft.CodeAnalysis.CSharp.Scripting.dll", 18 | "Microsoft.CodeAnalysis.dll", 19 | "Microsoft.CodeAnalysis.Scripting.dll", 20 | "Microsoft.CodeAnalysis.Workspaces.dll", 21 | "System.Collections.Immutable.dll", 22 | "System.Composition.AttributedModel.dll", 23 | "System.Composition.Convention.dll", 24 | "System.Composition.Hosting.dll", 25 | "System.Composition.Runtime.dll", 26 | "System.Composition.TypedParts.dll", 27 | "System.Reflection.Metadata.dll", 28 | "System.Runtime.Loader.dll", 29 | "Newtonsoft.Json.dll" 30 | ], 31 | "autoReferenced": true, 32 | "defineConstraints": [], 33 | "versionDefines": [], 34 | "noEngineReferences": false 35 | } -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # This .gitignore file should be placed at the root of your Unity project directory 2 | # 3 | # Get latest from https://github.com/github/gitignore/blob/master/Unity.gitignore 4 | # 5 | /[Ll]ibrary/ 6 | /[Tt]emp/ 7 | /[Oo]bj/ 8 | /[Bb]uild/ 9 | /[Bb]uilds/ 10 | /[Ll]ogs/ 11 | /[Mm]emoryCaptures/ 12 | 13 | # Asset meta data should only be ignored when the corresponding asset is also ignored 14 | !/[Aa]ssets/**/*.meta 15 | 16 | # Uncomment this line if you wish to ignore the asset store tools plugin 17 | # /[Aa]ssets/AssetStoreTools* 18 | 19 | # Autogenerated Jetbrains Rider plugin 20 | [Aa]ssets/Plugins/Editor/JetBrains* 21 | 22 | # Visual Studio cache directory 23 | .vs/ 24 | 25 | # Gradle cache directory 26 | .gradle/ 27 | 28 | # Autogenerated VS/MD/Consulo solution and project files 29 | ExportedObj/ 30 | .consulo/ 31 | *.csproj 32 | *.unityproj 33 | *.sln 34 | *.suo 35 | *.tmp 36 | *.user 37 | *.userprefs 38 | *.pidb 39 | *.booproj 40 | *.svd 41 | *.pdb 42 | *.mdb 43 | *.opendb 44 | *.VC.db 45 | 46 | # Unity3D generated meta files 47 | *.pidb.meta 48 | *.pdb.meta 49 | *.mdb.meta 50 | 51 | # Unity3D generated file on crash reports 52 | sysinfo.txt 53 | 54 | # Builds 55 | *.apk 56 | *.unitypackage 57 | 58 | # Crashlytics generated file 59 | crashlytics-build.properties 60 | 61 | __pycache__ 62 | __pycache__.meta 63 | /UserSettings 64 | -------------------------------------------------------------------------------- /ProjectSettings/MemorySettings.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!387306366 &1 4 | MemorySettings: 5 | m_ObjectHideFlags: 0 6 | m_EditorMemorySettings: 7 | m_MainAllocatorBlockSize: -1 8 | m_ThreadAllocatorBlockSize: -1 9 | m_MainGfxBlockSize: -1 10 | m_ThreadGfxBlockSize: -1 11 | m_CacheBlockSize: -1 12 | m_TypetreeBlockSize: -1 13 | m_ProfilerBlockSize: -1 14 | m_ProfilerEditorBlockSize: -1 15 | m_BucketAllocatorGranularity: -1 16 | m_BucketAllocatorBucketsCount: -1 17 | m_BucketAllocatorBlockSize: -1 18 | m_BucketAllocatorBlockCount: -1 19 | m_ProfilerBucketAllocatorGranularity: -1 20 | m_ProfilerBucketAllocatorBucketsCount: -1 21 | m_ProfilerBucketAllocatorBlockSize: -1 22 | m_ProfilerBucketAllocatorBlockCount: -1 23 | m_TempAllocatorSizeMain: -1 24 | m_JobTempAllocatorBlockSize: -1 25 | m_BackgroundJobTempAllocatorBlockSize: -1 26 | m_JobTempAllocatorReducedBlockSize: -1 27 | m_TempAllocatorSizeGIBakingWorker: -1 28 | m_TempAllocatorSizeNavMeshWorker: -1 29 | m_TempAllocatorSizeAudioWorker: -1 30 | m_TempAllocatorSizeCloudWorker: -1 31 | m_TempAllocatorSizeGfx: -1 32 | m_TempAllocatorSizeJobWorker: -1 33 | m_TempAllocatorSizeBackgroundWorker: -1 34 | m_TempAllocatorSizePreloadManager: -1 35 | m_PlatformMemorySettings: {} 36 | -------------------------------------------------------------------------------- /ProjectSettings/DynamicsManager.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!55 &1 4 | PhysicsManager: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 13 7 | m_Gravity: {x: 0, y: -9.81, z: 0} 8 | m_DefaultMaterial: {fileID: 0} 9 | m_BounceThreshold: 2 10 | m_DefaultMaxDepenetrationVelocity: 10 11 | m_SleepThreshold: 0.005 12 | m_DefaultContactOffset: 0.01 13 | m_DefaultSolverIterations: 6 14 | m_DefaultSolverVelocityIterations: 1 15 | m_QueriesHitBackfaces: 0 16 | m_QueriesHitTriggers: 1 17 | m_EnableAdaptiveForce: 0 18 | m_ClothInterCollisionDistance: 0.1 19 | m_ClothInterCollisionStiffness: 0.2 20 | m_ContactsGeneration: 1 21 | m_LayerCollisionMatrix: ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff 22 | m_AutoSimulation: 1 23 | m_AutoSyncTransforms: 0 24 | m_ReuseCollisionCallbacks: 0 25 | m_ClothInterCollisionSettingsToggle: 0 26 | m_ClothGravity: {x: 0, y: -9.81, z: 0} 27 | m_ContactPairsMode: 0 28 | m_BroadphaseType: 0 29 | m_WorldBounds: 30 | m_Center: {x: 0, y: 0, z: 0} 31 | m_Extent: {x: 250, y: 250, z: 250} 32 | m_WorldSubdivisions: 8 33 | m_FrictionType: 0 34 | m_EnableEnhancedDeterminism: 0 35 | m_EnableUnifiedHeightmaps: 1 36 | m_ImprovedPatchFriction: 0 37 | m_SolverType: 0 38 | m_DefaultMaxAngularSpeed: 50 39 | -------------------------------------------------------------------------------- /ProjectSettings/EditorSettings.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!159 &1 4 | EditorSettings: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 11 7 | m_SerializationMode: 2 8 | m_LineEndingsForNewScripts: 2 9 | m_DefaultBehaviorMode: 0 10 | m_PrefabRegularEnvironment: {fileID: 0} 11 | m_PrefabUIEnvironment: {fileID: 0} 12 | m_SpritePackerMode: 0 13 | m_SpritePackerPaddingPower: 1 14 | m_Bc7TextureCompressor: 0 15 | m_EtcTextureCompressorBehavior: 1 16 | m_EtcTextureFastCompressor: 1 17 | m_EtcTextureNormalCompressor: 2 18 | m_EtcTextureBestCompressor: 4 19 | m_ProjectGenerationIncludedExtensions: txt;xml;fnt;cd;asmdef;asmref;rsp;java;cpp;c;mm;m;h 20 | m_ProjectGenerationRootNamespace: 21 | m_EnableTextureStreamingInEditMode: 1 22 | m_EnableTextureStreamingInPlayMode: 1 23 | m_AsyncShaderCompilation: 1 24 | m_CachingShaderPreprocessor: 1 25 | m_PrefabModeAllowAutoSave: 1 26 | m_EnterPlayModeOptionsEnabled: 0 27 | m_EnterPlayModeOptions: 3 28 | m_GameObjectNamingDigits: 1 29 | m_GameObjectNamingScheme: 0 30 | m_AssetNamingUsesSpace: 1 31 | m_UseLegacyProbeSampleCount: 0 32 | m_SerializeInlineMappingsOnOneLine: 1 33 | m_DisableCookiesInLightmapper: 0 34 | m_AssetPipelineMode: 1 35 | m_RefreshImportMode: 0 36 | m_CacheServerMode: 0 37 | m_CacheServerEndpoint: 38 | m_CacheServerNamespacePrefix: default 39 | m_CacheServerEnableDownload: 1 40 | m_CacheServerEnableUpload: 1 41 | m_CacheServerEnableAuth: 0 42 | m_CacheServerEnableTls: 0 43 | m_CacheServerValidationMode: 2 44 | m_CacheServerDownloadBatchSize: 128 45 | -------------------------------------------------------------------------------- /ProjectSettings/NavMeshAreas.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!126 &1 4 | NavMeshProjectSettings: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 2 7 | areas: 8 | - name: Walkable 9 | cost: 1 10 | - name: Not Walkable 11 | cost: 1 12 | - name: Jump 13 | cost: 2 14 | - name: 15 | cost: 1 16 | - name: 17 | cost: 1 18 | - name: 19 | cost: 1 20 | - name: 21 | cost: 1 22 | - name: 23 | cost: 1 24 | - name: 25 | cost: 1 26 | - name: 27 | cost: 1 28 | - name: 29 | cost: 1 30 | - name: 31 | cost: 1 32 | - name: 33 | cost: 1 34 | - name: 35 | cost: 1 36 | - name: 37 | cost: 1 38 | - name: 39 | cost: 1 40 | - name: 41 | cost: 1 42 | - name: 43 | cost: 1 44 | - name: 45 | cost: 1 46 | - name: 47 | cost: 1 48 | - name: 49 | cost: 1 50 | - name: 51 | cost: 1 52 | - name: 53 | cost: 1 54 | - name: 55 | cost: 1 56 | - name: 57 | cost: 1 58 | - name: 59 | cost: 1 60 | - name: 61 | cost: 1 62 | - name: 63 | cost: 1 64 | - name: 65 | cost: 1 66 | - name: 67 | cost: 1 68 | - name: 69 | cost: 1 70 | - name: 71 | cost: 1 72 | m_LastAgentTypeID: -887442657 73 | m_Settings: 74 | - serializedVersion: 2 75 | agentTypeID: 0 76 | agentRadius: 0.5 77 | agentHeight: 2 78 | agentSlope: 45 79 | agentClimb: 0.75 80 | ledgeDropHeight: 0 81 | maxJumpAcrossDistance: 0 82 | minRegionArea: 2 83 | manualCellSize: 0 84 | cellSize: 0.16666667 85 | manualTileSize: 0 86 | tileSize: 256 87 | accuratePlacement: 0 88 | maxJobWorkers: 0 89 | preserveTilesOutsideBounds: 0 90 | debug: 91 | m_Flags: 0 92 | m_SettingNames: 93 | - Humanoid 94 | -------------------------------------------------------------------------------- /ProjectSettings/Physics2DSettings.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!19 &1 4 | Physics2DSettings: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 5 7 | m_Gravity: {x: 0, y: -9.81} 8 | m_DefaultMaterial: {fileID: 0} 9 | m_VelocityIterations: 8 10 | m_PositionIterations: 3 11 | m_VelocityThreshold: 1 12 | m_MaxLinearCorrection: 0.2 13 | m_MaxAngularCorrection: 8 14 | m_MaxTranslationSpeed: 100 15 | m_MaxRotationSpeed: 360 16 | m_BaumgarteScale: 0.2 17 | m_BaumgarteTimeOfImpactScale: 0.75 18 | m_TimeToSleep: 0.5 19 | m_LinearSleepTolerance: 0.01 20 | m_AngularSleepTolerance: 2 21 | m_DefaultContactOffset: 0.01 22 | m_JobOptions: 23 | serializedVersion: 2 24 | useMultithreading: 0 25 | useConsistencySorting: 0 26 | m_InterpolationPosesPerJob: 100 27 | m_NewContactsPerJob: 30 28 | m_CollideContactsPerJob: 100 29 | m_ClearFlagsPerJob: 200 30 | m_ClearBodyForcesPerJob: 200 31 | m_SyncDiscreteFixturesPerJob: 50 32 | m_SyncContinuousFixturesPerJob: 50 33 | m_FindNearestContactsPerJob: 100 34 | m_UpdateTriggerContactsPerJob: 100 35 | m_IslandSolverCostThreshold: 100 36 | m_IslandSolverBodyCostScale: 1 37 | m_IslandSolverContactCostScale: 10 38 | m_IslandSolverJointCostScale: 10 39 | m_IslandSolverBodiesPerJob: 50 40 | m_IslandSolverContactsPerJob: 50 41 | m_SimulationMode: 0 42 | m_QueriesHitTriggers: 1 43 | m_QueriesStartInColliders: 1 44 | m_CallbacksOnDisable: 1 45 | m_ReuseCollisionCallbacks: 0 46 | m_AutoSyncTransforms: 0 47 | m_AlwaysShowColliders: 0 48 | m_ShowColliderSleep: 1 49 | m_ShowColliderContacts: 0 50 | m_ShowColliderAABB: 0 51 | m_ContactArrowScale: 0.2 52 | m_ColliderAwakeColor: {r: 0.5686275, g: 0.95686275, b: 0.54509807, a: 0.7529412} 53 | m_ColliderAsleepColor: {r: 0.5686275, g: 0.95686275, b: 0.54509807, a: 0.36078432} 54 | m_ColliderContactColor: {r: 1, g: 0, b: 1, a: 0.6862745} 55 | m_ColliderAABBColor: {r: 1, g: 1, b: 0, a: 0.2509804} 56 | m_LayerCollisionMatrix: ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff 57 | -------------------------------------------------------------------------------- /Packages/packages-lock.json: -------------------------------------------------------------------------------- 1 | { 2 | "dependencies": { 3 | "com.unity.code-analysis": { 4 | "version": "0.1.0-preview.2", 5 | "depth": 0, 6 | "source": "registry", 7 | "dependencies": {}, 8 | "url": "https://packages.unity.com" 9 | }, 10 | "com.unity.ext.nunit": { 11 | "version": "1.0.6", 12 | "depth": 2, 13 | "source": "registry", 14 | "dependencies": {}, 15 | "url": "https://packages.unity.com" 16 | }, 17 | "com.unity.ide.visualstudio": { 18 | "version": "2.0.16", 19 | "depth": 0, 20 | "source": "registry", 21 | "dependencies": { 22 | "com.unity.test-framework": "1.1.9" 23 | }, 24 | "url": "https://packages.unity.com" 25 | }, 26 | "com.unity.ide.vscode": { 27 | "version": "1.2.5", 28 | "depth": 0, 29 | "source": "registry", 30 | "dependencies": {}, 31 | "url": "https://packages.unity.com" 32 | }, 33 | "com.unity.nuget.newtonsoft-json": { 34 | "version": "3.0.2", 35 | "depth": 0, 36 | "source": "registry", 37 | "dependencies": {}, 38 | "url": "https://packages.unity.com" 39 | }, 40 | "com.unity.scripting.python": { 41 | "version": "7.0.0", 42 | "depth": 0, 43 | "source": "registry", 44 | "dependencies": {}, 45 | "url": "https://packages.unity.com" 46 | }, 47 | "com.unity.test-framework": { 48 | "version": "1.1.31", 49 | "depth": 1, 50 | "source": "registry", 51 | "dependencies": { 52 | "com.unity.ext.nunit": "1.0.6", 53 | "com.unity.modules.imgui": "1.0.0", 54 | "com.unity.modules.jsonserialize": "1.0.0" 55 | }, 56 | "url": "https://packages.unity.com" 57 | }, 58 | "com.unity.ugui": { 59 | "version": "1.0.0", 60 | "depth": 0, 61 | "source": "builtin", 62 | "dependencies": { 63 | "com.unity.modules.ui": "1.0.0", 64 | "com.unity.modules.imgui": "1.0.0" 65 | } 66 | }, 67 | "com.unity.modules.imgui": { 68 | "version": "1.0.0", 69 | "depth": 1, 70 | "source": "builtin", 71 | "dependencies": {} 72 | }, 73 | "com.unity.modules.jsonserialize": { 74 | "version": "1.0.0", 75 | "depth": 2, 76 | "source": "builtin", 77 | "dependencies": {} 78 | }, 79 | "com.unity.modules.ui": { 80 | "version": "1.0.0", 81 | "depth": 1, 82 | "source": "builtin", 83 | "dependencies": {} 84 | } 85 | } 86 | } 87 | -------------------------------------------------------------------------------- /ProjectSettings/GraphicsSettings.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!30 &1 4 | GraphicsSettings: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 14 7 | m_Deferred: 8 | m_Mode: 1 9 | m_Shader: {fileID: 69, guid: 0000000000000000f000000000000000, type: 0} 10 | m_DeferredReflections: 11 | m_Mode: 1 12 | m_Shader: {fileID: 74, guid: 0000000000000000f000000000000000, type: 0} 13 | m_ScreenSpaceShadows: 14 | m_Mode: 1 15 | m_Shader: {fileID: 64, guid: 0000000000000000f000000000000000, type: 0} 16 | m_LegacyDeferred: 17 | m_Mode: 1 18 | m_Shader: {fileID: 63, guid: 0000000000000000f000000000000000, type: 0} 19 | m_DepthNormals: 20 | m_Mode: 1 21 | m_Shader: {fileID: 62, guid: 0000000000000000f000000000000000, type: 0} 22 | m_MotionVectors: 23 | m_Mode: 1 24 | m_Shader: {fileID: 75, guid: 0000000000000000f000000000000000, type: 0} 25 | m_LightHalo: 26 | m_Mode: 1 27 | m_Shader: {fileID: 105, guid: 0000000000000000f000000000000000, type: 0} 28 | m_LensFlare: 29 | m_Mode: 1 30 | m_Shader: {fileID: 102, guid: 0000000000000000f000000000000000, type: 0} 31 | m_VideoShadersIncludeMode: 2 32 | m_AlwaysIncludedShaders: 33 | - {fileID: 7, guid: 0000000000000000f000000000000000, type: 0} 34 | - {fileID: 15104, guid: 0000000000000000f000000000000000, type: 0} 35 | - {fileID: 15105, guid: 0000000000000000f000000000000000, type: 0} 36 | - {fileID: 15106, guid: 0000000000000000f000000000000000, type: 0} 37 | - {fileID: 10753, guid: 0000000000000000f000000000000000, type: 0} 38 | - {fileID: 10770, guid: 0000000000000000f000000000000000, type: 0} 39 | - {fileID: 10783, guid: 0000000000000000f000000000000000, type: 0} 40 | m_PreloadedShaders: [] 41 | m_PreloadShadersBatchTimeLimit: -1 42 | m_SpritesDefaultMaterial: {fileID: 10754, guid: 0000000000000000f000000000000000, type: 0} 43 | m_CustomRenderPipeline: {fileID: 0} 44 | m_TransparencySortMode: 0 45 | m_TransparencySortAxis: {x: 0, y: 0, z: 1} 46 | m_DefaultRenderingPath: 1 47 | m_DefaultMobileRenderingPath: 1 48 | m_TierSettings: [] 49 | m_LightmapStripping: 0 50 | m_FogStripping: 0 51 | m_InstancingStripping: 0 52 | m_LightmapKeepPlain: 1 53 | m_LightmapKeepDirCombined: 1 54 | m_LightmapKeepDynamicPlain: 1 55 | m_LightmapKeepDynamicDirCombined: 1 56 | m_LightmapKeepShadowMask: 1 57 | m_LightmapKeepSubtractive: 1 58 | m_FogKeepLinear: 1 59 | m_FogKeepExp: 1 60 | m_FogKeepExp2: 1 61 | m_AlbedoSwatchInfos: [] 62 | m_LightsUseLinearIntensity: 0 63 | m_LightsUseColorTemperature: 0 64 | m_DefaultRenderingLayerMask: 1 65 | m_LogWhenShaderIsCompiled: 0 66 | m_SRPDefaultSettings: {} 67 | -------------------------------------------------------------------------------- /Assets/IntegrationGPT/Editor/Evaluator.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.CodeAnalysis; 2 | using Microsoft.CodeAnalysis.CSharp.Scripting; 3 | using Microsoft.CodeAnalysis.Scripting; 4 | using Microsoft.CodeAnalysis.Text; 5 | using System; 6 | using System.Collections.Generic; 7 | using System.Threading.Tasks; 8 | using UnityEngine; 9 | 10 | // Evaluation Manager 11 | internal class Evaluator 12 | { 13 | private static Evaluator instance = new Evaluator(); 14 | public static Evaluator Instance { get { return instance; } } 15 | 16 | public event Action OnEvaluationSuccess = delegate { }; 17 | public event Action OnEvaluationError = delegate { }; 18 | public event Action OnBeforeEvaluation = delegate { }; 19 | 20 | private AdhocWorkspace Workspace { get; set; } 21 | private SourceText Text { get; set; } 22 | private string Code { get; set; } 23 | 24 | private ScriptState ScriptState { get; set; } 25 | 26 | public static void Init(ref Evaluator value) 27 | { 28 | if (value == null) // UI window opened 29 | { 30 | value = instance; 31 | } 32 | else // Domain reload 33 | { 34 | instance = value; 35 | } 36 | } 37 | 38 | public Evaluator() 39 | { 40 | Init(); 41 | } 42 | 43 | public async void Init() 44 | { 45 | List references = new List(); 46 | foreach (var assembly in Inspector.GetReferencableAssemblies()) 47 | references.Add(MetadataReference.CreateFromFile(assembly.Location)); 48 | 49 | var options = ScriptOptions.Default.WithReferences(references); 50 | 51 | ScriptState = await CSharpScript.RunAsync("", options); 52 | } 53 | 54 | public async Task Evaluate(string code) 55 | { 56 | OnBeforeEvaluation(code); 57 | var error = await EvaluateSilently(code); 58 | 59 | // Don't call delegate method in try/catch block to avoid silencing throws 60 | if (error == null) 61 | OnEvaluationSuccess(ScriptState.ReturnValue); 62 | else 63 | { 64 | var message = string.Join(Environment.NewLine, error.Diagnostics); 65 | OnEvaluationError(message, error); 66 | } 67 | } 68 | 69 | // Evaluate without telling the delegates 70 | public async Task EvaluateSilently(string code) 71 | { 72 | CompilationErrorException error = null; 73 | try 74 | { 75 | ScriptState = await ScriptState.ContinueWithAsync(code); 76 | } 77 | catch (CompilationErrorException e) 78 | { 79 | error = e; 80 | } 81 | 82 | return error; 83 | } 84 | 85 | // More then a little possibly not the best way to do this. There has to be a more 86 | // solid way to add a namespace without simply re-evaluating. 87 | public async Task AddNamespace(string ns) 88 | { 89 | return await AddNamespace(new List { ns }); 90 | } 91 | 92 | public async Task AddNamespace(IEnumerable namespaces) 93 | { 94 | var code = ""; 95 | foreach (var ns in namespaces) 96 | code += $"using {ns};\n"; 97 | 98 | var error = await EvaluateSilently(code); 99 | if (error != null) 100 | Debug.Log("Error adding namespace: " + error.Message + "\n\n" + code); 101 | 102 | return error; 103 | } 104 | } 105 | -------------------------------------------------------------------------------- /Assets/IntegrationGPT/gpt.py: -------------------------------------------------------------------------------- 1 | import os 2 | import sys 3 | import asyncio 4 | import json 5 | import enum 6 | import socket 7 | 8 | import EdgeGPT as bing 9 | import revChatGPT.V3 as chatgpt 10 | import Bard as googleBard 11 | 12 | 13 | class AIType(enum.IntEnum): 14 | ChatGPT = 0 15 | Bing = 1 16 | Bard = 2 17 | 18 | 19 | gpt_path = os.environ["GPT_PATH"] 20 | config_prompt = "" 21 | config_path = None 22 | config_data = None 23 | 24 | client_socket = socket.socket(socket.AF_INET, socket.SOCK_STREAM) 25 | server_address = ("localhost", 10086) 26 | client_socket.connect(server_address) 27 | 28 | 29 | def close_socket(): 30 | client_socket.close() 31 | 32 | 33 | def send_text(msg): 34 | client_socket.sendall(msg.encode()) 35 | 36 | 37 | def send_exception(e: Exception): 38 | exc_type, exc_value, exc_traceback = sys.exc_info() 39 | fname = os.path.split(exc_traceback.tb_frame.f_code.co_filename)[1] 40 | send_text(f"An error occurred: {repr(e)}.\n:::{fname}:{exc_traceback.tb_lineno}") 41 | 42 | 43 | def _common_filter(type, question): 44 | # 特殊命令 45 | return False 46 | 47 | 48 | def set_prompt(prompt): 49 | global config_prompt 50 | config_prompt = prompt 51 | 52 | 53 | def set_config(path): 54 | global config_path 55 | global config_data 56 | 57 | config_path = path 58 | with open(path, encoding="utf8") as f: 59 | config_data = json.load(f) 60 | 61 | 62 | async def _ask_chat_gpt(question): 63 | try: 64 | type = AIType.ChatGPT 65 | if _common_filter(type, question): 66 | return 67 | 68 | prompt = config_prompt + question 69 | api_key = config_data["api_key"] 70 | model = config_data["model"] 71 | 72 | chatbot = chatgpt.ChatbotCLI(api_key=api_key, engine=model) 73 | for query in chatbot.ask_stream(prompt): 74 | send_text(query) 75 | except Exception as e: 76 | send_exception(e) 77 | finally: 78 | close_socket() 79 | 80 | 81 | def ask_chat_gpt(question): 82 | asyncio.run(_ask_chat_gpt(question)) 83 | 84 | 85 | async def _ask_bing(question): 86 | try: 87 | type = AIType.Bing 88 | if _common_filter(type, question): 89 | return 90 | 91 | prompt = config_prompt + question 92 | style = config_data["style"] 93 | 94 | dir_path, filename = os.path.split(config_path) 95 | cookie_path = os.path.join(dir_path, config_data["cookie_path"]) 96 | chatbot = bing.Chatbot(cookie_path=cookie_path) 97 | 98 | wrote = 0 99 | async for final, response in chatbot.ask_stream( 100 | prompt=prompt, conversation_style=style 101 | ): 102 | if not final: 103 | send_text(response[wrote:]) 104 | wrote = len(response) 105 | await chatbot.close() 106 | except Exception as e: 107 | send_exception(e) 108 | finally: 109 | close_socket() 110 | 111 | 112 | def ask_bing(question): 113 | asyncio.run(_ask_bing(question)) 114 | 115 | 116 | async def _ask_bard(question): 117 | try: 118 | type = AIType.Bard 119 | if _common_filter(type, question): 120 | return 121 | 122 | prompt = config_prompt + question 123 | session = config_data["session"] 124 | 125 | chatbot = googleBard.Chatbot(session) 126 | send_text(chatbot.ask(prompt)["content"]) 127 | except Exception as e: 128 | send_exception(e) 129 | finally: 130 | close_socket() 131 | 132 | 133 | def ask_bard(question): 134 | asyncio.run(_ask_bard(question)) 135 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # UniGPT [English Doc](https://github.com/tylearymf/UniGPT/blob/main/README_EN.md) 2 | 3 | **在Unity编辑器中使用ChatGPT、NewBing、GoogleBard来生成并执行代码。** 4 | 5 | **输出文本支持流式传输** 6 | 7 | --- 8 | 9 | ChatGPT 10 | 11 | ![chatgpt](Screenshots/chatgpt.gif) 12 | 13 | New Bing 14 | 15 | ![binggpt](Screenshots/binggpt.gif) 16 | 17 | Google Bard 18 | 19 | ![bard](Screenshots/bard.gif) 20 | 21 | 22 | 23 | ### 安装要求 24 | 25 | **Unity版本 >= 2019.3** 26 | 27 | ### 初始化环境 28 | 29 | 1. 进入Unity工程,等待Python环境初始化完成,然后 Edit -> Project Settings -> Python Scripting -> 30 | 31 | Launch Terminal (打开命令行工具) 32 | 33 | ![image-20230324020733689](Screenshots/image-20230324020733689.png) 34 | 35 | 2. 按顺序执行以下命令 36 | 37 | ```bash 38 | python -m pip install --upgrade pip 39 | python -m pip install revChatGPT 40 | python -m pip install EdgeGPT 41 | python -m pip install GoogleBard 42 | ``` 43 | 44 | 3. 按照下面的教程配置AI 45 | 46 | ### 使用教程 47 | 48 | #### 配置 ChatGPT 49 | 50 | 1. 获取 ChatGPT 的 api_key,具体参考:https://platform.openai.com/account/api-keys 51 | 2. 编辑该Json配置:Assets/IntegrationGPT/Config~/chat_gpt_config.json 52 | 3. 国内的可以参考这里部署个腾讯云函数:[openai-api-proxy](https://github.com/easychen/openai-api-proxy/blob/master/FUNC.md),然后替换掉配置中的 api_url 即可 53 | 54 | ```json 55 | { 56 | # 将获取到的 api_key 替换掉下面的 57 | "api_key": "sk-xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx", 58 | # chatgpt使用的模型, 如果你是Plus用户, 可以修改模型为 gpt-4 59 | "model": "gpt-3.5-turbo", 60 | # 代理设置,如果不需要则删除,在国内的必须要设置,否则无法访问openai的api 61 | "proxy": "http://127.0.0.1:1080", 62 | # 如果有国内镜像的,可以将api地址填写在这里 63 | # 官方API:https://api.openai.com/v1/chat/completions 64 | "api_url": "", 65 | # 这个是ChatGPT的提示语,可以根据需要增删 66 | "prompt": { 67 | "聊天": "", 68 | "生成并执行代码": "我想让你在Unity里面实现一个需求, 然后你给我回复代码, 你需要将实现逻辑写在TemplateClass中的Test静态方法里面, 我希望我不需要设置任何东西, 只手动调用Test方法后就能得到正确的结果, 我希望你只回复代码, 而不是其他任何内容, 不要注释.\n我的第一个需求是\n" 69 | } 70 | } 71 | ``` 72 | 73 | #### 配置 New Bing 74 | 75 | 1. 首先确保你已经加入了 New Bing,具体参考:https://github.com/acheong08/EdgeGPT#checking-access-required 76 | 77 | 2. 然后获取 cookies,具体参考:https://github.com/acheong08/EdgeGPT#getting-authentication-required 78 | 79 | 3. 将获取的 cookies 拷贝到 Assets/IntegrationGPT/Config~/new_bing_cookies.json 中 80 | 81 | 4. 编辑该Json配置:Assets/IntegrationGPT/Config~/new_bing_config.json 82 | 83 | ```json 84 | { 85 | # 对话样式 86 | # 更具创造力:creative 平衡:balanced 精确:precise 87 | "style": "precise", 88 | # 代理设置,如果不需要则删除,在国内的必须要设置,否则无法访问bing的api 89 | "proxy": "http://127.0.0.1:1080", 90 | # 如果有国内镜像的,可以将api地址填写在这里 91 | # 官方API:https://edgeservices.bing.com/edgesvc/turing/conversation/create 92 | "api_url": "", 93 | # 这个是Bing的提示语,可以根据需要增删 94 | "prompts": { 95 | "聊天": "", 96 | "生成并执行代码": "我想让你在Unity里面实现一个需求, 然后你给我回复代码, 你需要将实现逻辑写在TemplateClass中的Test静态方法里面, 并正确引用命名空间, 我希望我不需要设置任何东西, 只手动调用Test方法后就能得到正确的结果,我希望你只回复代码, 而不是其他任何内容, 不要注释.\n我的第一个需求是\n" 97 | } 98 | } 99 | ``` 100 | 101 | #### 配置 Google Bard 102 | 103 | 1. 首先确保你已经加入了 Google Bard 104 | 105 | 2. 然后获取session,具体参考:https://github.com/acheong08/Bard#authentication 106 | 107 | 3. 编辑该Json配置:Assets/IntegrationGPT/Config~/google_bard_config.json 108 | 109 | ```json 110 | { 111 | # google bard 的 session 112 | "session": "", 113 | # 代理设置,如果不需要则删除,在国内的必须要设置,否则无法访问google的api 114 | "proxy": "", 115 | # 这个是Google Bard的提示语,可以根据需要增删 116 | "prompts":{ 117 | "Chat": "" 118 | } 119 | } 120 | ``` 121 | 122 | 123 | 124 | 125 | 126 | ### 引用 127 | - [ChatGPT](https://github.com/acheong08/ChatGPT) 128 | - [EdgeGPT](https://github.com/acheong08/EdgeGPT) 129 | - [GoogleBard](https://github.com/acheong08/Bard) 130 | -------------------------------------------------------------------------------- /Assets/IntegrationGPT/Editor/Inspector.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Reflection; 5 | using UnityEngine; 6 | 7 | internal class Inspector 8 | { 9 | public Inspector() 10 | { 11 | } 12 | 13 | public static IEnumerable GetLoadableTypes(Assembly assembly) 14 | { 15 | if (assembly == null) throw new ArgumentNullException("assembly"); 16 | 17 | try 18 | { 19 | return assembly.GetTypes(); 20 | } 21 | catch (ReflectionTypeLoadException e) 22 | { 23 | return e.Types.Where(t => t != null); 24 | } 25 | } 26 | 27 | /// 28 | /// Get all types of a specific type/interface in an assembly 29 | /// 30 | /// Assembly to check 31 | /// Type (can be Interface type) 32 | /// 33 | public static IEnumerable GetTypesWithInterface(Assembly assembly, Type type) 34 | { 35 | return GetLoadableTypes(assembly).Where(type.IsAssignableFrom).ToList(); 36 | } 37 | 38 | public static IEnumerable GetTypesWithInterface(Type type) 39 | { 40 | var types = new List(); 41 | foreach (var assembly in GetAllAssemblies()) 42 | types.AddRange(GetTypesWithInterface(assembly, type)); 43 | 44 | return types; 45 | } 46 | 47 | public static IEnumerable GetAllTypesWithStaticPropertiesForAssembly(Assembly assembly) 48 | { 49 | var result = new List(); 50 | if (assembly.IsDynamic) 51 | return result; 52 | 53 | Type[] types; 54 | try 55 | { 56 | types = assembly.GetTypes(); 57 | } 58 | catch (ReflectionTypeLoadException e) 59 | { 60 | var message = $"Could not load types for assembly (some types in this assembly might refer to assemblies that are not referenced): {assembly.FullName}\n"; 61 | foreach (var except in e.LoaderExceptions) 62 | message += "\n -- Loader exception: " + except.Message; 63 | 64 | Debug.LogWarning(message); 65 | 66 | types = e.Types.Where(t => t != null).ToArray(); 67 | } 68 | 69 | foreach (Type t in types.Where(t => 70 | t != null && 71 | !t.IsInterface && 72 | !t.IsAbstract && 73 | !t.IsEnum && 74 | !t.ContainsGenericParameters)) 75 | { 76 | if (!t.IsClass && !t.IsValueType) continue; 77 | 78 | var staticProperties = t.GetFields(BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.Static); 79 | if (!staticProperties.Any()) continue; 80 | 81 | result.Add(t); 82 | } 83 | 84 | return result; 85 | } 86 | 87 | public static IEnumerable GetAllTypesWithStaticPropertiesForAssemblyNamespace(Assembly assembly, string ns) 88 | { 89 | return GetAllTypesWithStaticPropertiesForAssembly(assembly).Where(t => t.Namespace == ns); 90 | } 91 | 92 | public static IEnumerable GetAllAssemblies() 93 | { 94 | AppDomain app = AppDomain.CurrentDomain; 95 | var allAssemblies = app.GetAssemblies(); 96 | 97 | return allAssemblies; 98 | } 99 | 100 | // Get list of all relevant assemblies 101 | // Currently not taking all assemblies because it caused an issue when setting up 102 | // the code analyser. Need to investigate. 103 | public static IEnumerable GetRelevantAssemblies(bool includeSystem = false) 104 | { 105 | AppDomain app = AppDomain.CurrentDomain; 106 | var allAssemblies = app.GetAssemblies(); 107 | 108 | // Note: Jetbrains assembly loading throws exception. Needs to investigate 109 | var assemblies = allAssemblies 110 | .Where(assembly => assembly.FullName.ToLower().Contains("unity")) 111 | .OrderBy(assembly => assembly.FullName).ToList(); 112 | 113 | // Add system assemblies at the end (until I have assembly/namespace filtering) 114 | if (includeSystem) 115 | assemblies.AddRange(allAssemblies.Where(assembly => assembly.FullName.Contains("System"))); 116 | 117 | return assemblies; 118 | } 119 | 120 | public static IEnumerable GetReferencableAssemblies() 121 | { 122 | return GetAllAssemblies().Where(assembly => !assembly.IsDynamic && !string.IsNullOrEmpty(assembly.Location)); 123 | } 124 | 125 | public static IEnumerable GetAllNamespaces(Assembly assembly) 126 | { 127 | return GetLoadableTypes(assembly) 128 | .Select(t => t.Namespace) 129 | .Distinct() 130 | .OrderBy(ns => ns); 131 | } 132 | } 133 | -------------------------------------------------------------------------------- /README_EN.md: -------------------------------------------------------------------------------- 1 | *The following content is translated by ChatGPT.* 2 | 3 | --- 4 | 5 | # UniGPT 6 | 7 | **Use ChatGPT, NewBing and GoogleBard to generate and execute code within the Unity editor.** 8 | 9 | **Output text supports streaming.** 10 | 11 | ------ 12 | 13 | ChatGPT 14 | 15 | ![chatgpt](Screenshots/chatgpt.gif) 16 | 17 | New Bing 18 | 19 | ![binggpt](Screenshots/binggpt.gif) 20 | 21 | Google Bard 22 | 23 | ![bard](Screenshots/bard.gif) 24 | 25 | 26 | 27 | ### Installation Requirements 28 | 29 | **Unity version >= 2019.3** 30 | 31 | ### Initializing Environment 32 | 33 | 1. Open your Unity project, wait for the Python environment to finish initializing, then go to Edit -> Project Settings -> Python Scripting -> Launch Terminal (open the command-line tool) 34 | 35 | ![image-20230324020733689](Screenshots/image-20230324020733689.png) 36 | 37 | 2. Execute the following commands in order: 38 | 39 | ```bash 40 | python -m pip install --upgrade pip 41 | python -m pip install revChatGPT 42 | python -m pip install EdgeGPT 43 | python -m pip install GoogleBard 44 | ``` 45 | 46 | 3. Follow the tutorial below to configure AI. 47 | 48 | ### Usage Tutorial 49 | 50 | #### Configure ChatGPT 51 | 52 | 1. Obtain the api_key for ChatGPT, refer to: https://platform.openai.com/account/api-keys 53 | 2. Edit this JSON configuration: Assets/IntegrationGPT/Config~/chat_gpt_config.json 54 | 55 | ```json 56 | { 57 | # Replace the api_key below with the one you obtained 58 | "api_key": "sk-xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx", 59 | # The model used by ChatGPT, If you are a Plus user, you can change the model to gpt-4. 60 | "model": "gpt-3.5-turbo", 61 | # Proxy settings, delete if not needed. Must be set for users in China to access the openai API. 62 | "proxy": "http://127.0.0.1:1080", 63 | # If there are domestic mirror sites, you can fill in the api address here 64 | # Official API: https://api.openai.com/v1/chat/completions 65 | "api_url": "", 66 | # This is the prompt for ChatGPT, you can add or delete prompts as needed 67 | "prompt": { 68 | "Chat": "", 69 | "Generate and execute code": "I want you to implement a requirement in Unity and then reply with the code. You need to write the implementation logic in the Test static method of the TemplateClass, and correctly reference the namespace. I hope I don't need to set anything, and I can get the correct results by manually calling the Test method. I hope you only reply with the code, not any other content, and don't add comments.\nMy first requirement is\n" 70 | } 71 | } 72 | ``` 73 | 74 | #### Configure New Bing 75 | 76 | 1. First, make sure you have joined New Bing, refer to: https://github.com/acheong08/EdgeGPT#checking-access-required 77 | 78 | 2. Then get the cookies, refer to: https://github.com/acheong08/EdgeGPT#getting-authentication-required 79 | 80 | 3. Copy the obtained cookies to Assets/IntegrationGPT/Config~/new_bing_cookies.json 81 | 82 | 4. Edit this JSON configuration: Assets/IntegrationGPT/Config~/new_bing_config.json 83 | 84 | ```json 85 | { 86 | # Conversation style 87 | # Creative: creative, Balanced: balanced, Precise: precise 88 | "style": "precise", 89 | # Proxy settings, delete if not needed. Must be set for users in China to access the Bing API. 90 | "proxy": "http://127.0.0.1:1080", 91 | # If there are domestic mirror sites, you can fill in the api address here 92 | # Official API: https://edgeservices.bing.com/edgesvc/turing/conversation/create 93 | "api_url": "", 94 | # This is the prompt for Bing, you can add or delete prompts as needed 95 | "prompts": { 96 | "Chat": "", 97 | "Generate and execute code": "I want you to implement a requirement in Unity and then reply with the code. You need to write the implementation logic in the Test static method of the TemplateClass, and correctly reference the namespace. I hope I don't need to set anything, and I can get the correct results by manually calling the Test method. I hope you only reply with the code, not any other content, and don't add comments.\nMy first requirement is\n" 98 | } 99 | } 100 | ``` 101 | 102 | #### Configure Google Bard 103 | 104 | 1. First, make sure you have joined Google Bard. 105 | 106 | 2. Then obtain the session. For details, refer to: https://github.com/acheong08/Bard#authentication 107 | 108 | 3. Edit this JSON configuration: Assets/IntegrationGPT/Config~/google_bard_config.json. 109 | 110 | ```json 111 | { 112 | # Session for Google Bard 113 | "session": "", 114 | # Proxy settings, delete if not needed. Must be set for users in China to access the Google API 115 | "proxy": "", 116 | # This is the prompt for Google Bard, you can add or delete prompts as needed 117 | "prompts":{ 118 | "Chat": "" 119 | } 120 | } 121 | ``` 122 | 123 | 124 | 125 | 126 | 127 | ### References 128 | 129 | - [ChatGPT](https://github.com/acheong08/ChatGPT) 130 | - [EdgeGPT](https://github.com/acheong08/EdgeGPT) 131 | - [GoogleBard](https://github.com/acheong08/Bard) -------------------------------------------------------------------------------- /ProjectSettings/InputManager.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!13 &1 4 | InputManager: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 2 7 | m_Axes: 8 | - serializedVersion: 3 9 | m_Name: Horizontal 10 | descriptiveName: 11 | descriptiveNegativeName: 12 | negativeButton: left 13 | positiveButton: right 14 | altNegativeButton: a 15 | altPositiveButton: d 16 | gravity: 3 17 | dead: 0.001 18 | sensitivity: 3 19 | snap: 1 20 | invert: 0 21 | type: 0 22 | axis: 0 23 | joyNum: 0 24 | - serializedVersion: 3 25 | m_Name: Vertical 26 | descriptiveName: 27 | descriptiveNegativeName: 28 | negativeButton: down 29 | positiveButton: up 30 | altNegativeButton: s 31 | altPositiveButton: w 32 | gravity: 3 33 | dead: 0.001 34 | sensitivity: 3 35 | snap: 1 36 | invert: 0 37 | type: 0 38 | axis: 0 39 | joyNum: 0 40 | - serializedVersion: 3 41 | m_Name: Fire1 42 | descriptiveName: 43 | descriptiveNegativeName: 44 | negativeButton: 45 | positiveButton: left ctrl 46 | altNegativeButton: 47 | altPositiveButton: mouse 0 48 | gravity: 1000 49 | dead: 0.001 50 | sensitivity: 1000 51 | snap: 0 52 | invert: 0 53 | type: 0 54 | axis: 0 55 | joyNum: 0 56 | - serializedVersion: 3 57 | m_Name: Fire2 58 | descriptiveName: 59 | descriptiveNegativeName: 60 | negativeButton: 61 | positiveButton: left alt 62 | altNegativeButton: 63 | altPositiveButton: mouse 1 64 | gravity: 1000 65 | dead: 0.001 66 | sensitivity: 1000 67 | snap: 0 68 | invert: 0 69 | type: 0 70 | axis: 0 71 | joyNum: 0 72 | - serializedVersion: 3 73 | m_Name: Fire3 74 | descriptiveName: 75 | descriptiveNegativeName: 76 | negativeButton: 77 | positiveButton: left shift 78 | altNegativeButton: 79 | altPositiveButton: mouse 2 80 | gravity: 1000 81 | dead: 0.001 82 | sensitivity: 1000 83 | snap: 0 84 | invert: 0 85 | type: 0 86 | axis: 0 87 | joyNum: 0 88 | - serializedVersion: 3 89 | m_Name: Jump 90 | descriptiveName: 91 | descriptiveNegativeName: 92 | negativeButton: 93 | positiveButton: space 94 | altNegativeButton: 95 | altPositiveButton: 96 | gravity: 1000 97 | dead: 0.001 98 | sensitivity: 1000 99 | snap: 0 100 | invert: 0 101 | type: 0 102 | axis: 0 103 | joyNum: 0 104 | - serializedVersion: 3 105 | m_Name: Mouse X 106 | descriptiveName: 107 | descriptiveNegativeName: 108 | negativeButton: 109 | positiveButton: 110 | altNegativeButton: 111 | altPositiveButton: 112 | gravity: 0 113 | dead: 0 114 | sensitivity: 0.1 115 | snap: 0 116 | invert: 0 117 | type: 1 118 | axis: 0 119 | joyNum: 0 120 | - serializedVersion: 3 121 | m_Name: Mouse Y 122 | descriptiveName: 123 | descriptiveNegativeName: 124 | negativeButton: 125 | positiveButton: 126 | altNegativeButton: 127 | altPositiveButton: 128 | gravity: 0 129 | dead: 0 130 | sensitivity: 0.1 131 | snap: 0 132 | invert: 0 133 | type: 1 134 | axis: 1 135 | joyNum: 0 136 | - serializedVersion: 3 137 | m_Name: Mouse ScrollWheel 138 | descriptiveName: 139 | descriptiveNegativeName: 140 | negativeButton: 141 | positiveButton: 142 | altNegativeButton: 143 | altPositiveButton: 144 | gravity: 0 145 | dead: 0 146 | sensitivity: 0.1 147 | snap: 0 148 | invert: 0 149 | type: 1 150 | axis: 2 151 | joyNum: 0 152 | - serializedVersion: 3 153 | m_Name: Horizontal 154 | descriptiveName: 155 | descriptiveNegativeName: 156 | negativeButton: 157 | positiveButton: 158 | altNegativeButton: 159 | altPositiveButton: 160 | gravity: 0 161 | dead: 0.19 162 | sensitivity: 1 163 | snap: 0 164 | invert: 0 165 | type: 2 166 | axis: 0 167 | joyNum: 0 168 | - serializedVersion: 3 169 | m_Name: Vertical 170 | descriptiveName: 171 | descriptiveNegativeName: 172 | negativeButton: 173 | positiveButton: 174 | altNegativeButton: 175 | altPositiveButton: 176 | gravity: 0 177 | dead: 0.19 178 | sensitivity: 1 179 | snap: 0 180 | invert: 1 181 | type: 2 182 | axis: 1 183 | joyNum: 0 184 | - serializedVersion: 3 185 | m_Name: Fire1 186 | descriptiveName: 187 | descriptiveNegativeName: 188 | negativeButton: 189 | positiveButton: joystick button 0 190 | altNegativeButton: 191 | altPositiveButton: 192 | gravity: 1000 193 | dead: 0.001 194 | sensitivity: 1000 195 | snap: 0 196 | invert: 0 197 | type: 0 198 | axis: 0 199 | joyNum: 0 200 | - serializedVersion: 3 201 | m_Name: Fire2 202 | descriptiveName: 203 | descriptiveNegativeName: 204 | negativeButton: 205 | positiveButton: joystick button 1 206 | altNegativeButton: 207 | altPositiveButton: 208 | gravity: 1000 209 | dead: 0.001 210 | sensitivity: 1000 211 | snap: 0 212 | invert: 0 213 | type: 0 214 | axis: 0 215 | joyNum: 0 216 | - serializedVersion: 3 217 | m_Name: Fire3 218 | descriptiveName: 219 | descriptiveNegativeName: 220 | negativeButton: 221 | positiveButton: joystick button 2 222 | altNegativeButton: 223 | altPositiveButton: 224 | gravity: 1000 225 | dead: 0.001 226 | sensitivity: 1000 227 | snap: 0 228 | invert: 0 229 | type: 0 230 | axis: 0 231 | joyNum: 0 232 | - serializedVersion: 3 233 | m_Name: Jump 234 | descriptiveName: 235 | descriptiveNegativeName: 236 | negativeButton: 237 | positiveButton: joystick button 3 238 | altNegativeButton: 239 | altPositiveButton: 240 | gravity: 1000 241 | dead: 0.001 242 | sensitivity: 1000 243 | snap: 0 244 | invert: 0 245 | type: 0 246 | axis: 0 247 | joyNum: 0 248 | - serializedVersion: 3 249 | m_Name: Submit 250 | descriptiveName: 251 | descriptiveNegativeName: 252 | negativeButton: 253 | positiveButton: return 254 | altNegativeButton: 255 | altPositiveButton: joystick button 0 256 | gravity: 1000 257 | dead: 0.001 258 | sensitivity: 1000 259 | snap: 0 260 | invert: 0 261 | type: 0 262 | axis: 0 263 | joyNum: 0 264 | - serializedVersion: 3 265 | m_Name: Submit 266 | descriptiveName: 267 | descriptiveNegativeName: 268 | negativeButton: 269 | positiveButton: enter 270 | altNegativeButton: 271 | altPositiveButton: space 272 | gravity: 1000 273 | dead: 0.001 274 | sensitivity: 1000 275 | snap: 0 276 | invert: 0 277 | type: 0 278 | axis: 0 279 | joyNum: 0 280 | - serializedVersion: 3 281 | m_Name: Cancel 282 | descriptiveName: 283 | descriptiveNegativeName: 284 | negativeButton: 285 | positiveButton: escape 286 | altNegativeButton: 287 | altPositiveButton: joystick button 1 288 | gravity: 1000 289 | dead: 0.001 290 | sensitivity: 1000 291 | snap: 0 292 | invert: 0 293 | type: 0 294 | axis: 0 295 | joyNum: 0 296 | m_UsePhysicalKeys: 0 297 | -------------------------------------------------------------------------------- /ProjectSettings/QualitySettings.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!47 &1 4 | QualitySettings: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 5 7 | m_CurrentQuality: 5 8 | m_QualitySettings: 9 | - serializedVersion: 2 10 | name: Very Low 11 | pixelLightCount: 0 12 | shadows: 0 13 | shadowResolution: 0 14 | shadowProjection: 1 15 | shadowCascades: 1 16 | shadowDistance: 15 17 | shadowNearPlaneOffset: 3 18 | shadowCascade2Split: 0.33333334 19 | shadowCascade4Split: {x: 0.06666667, y: 0.2, z: 0.46666667} 20 | shadowmaskMode: 0 21 | skinWeights: 1 22 | textureQuality: 1 23 | anisotropicTextures: 0 24 | antiAliasing: 0 25 | softParticles: 0 26 | softVegetation: 0 27 | realtimeReflectionProbes: 0 28 | billboardsFaceCameraPosition: 0 29 | vSyncCount: 0 30 | lodBias: 0.3 31 | maximumLODLevel: 0 32 | streamingMipmapsActive: 0 33 | streamingMipmapsAddAllCameras: 1 34 | streamingMipmapsMemoryBudget: 512 35 | streamingMipmapsRenderersPerFrame: 512 36 | streamingMipmapsMaxLevelReduction: 2 37 | streamingMipmapsMaxFileIORequests: 1024 38 | particleRaycastBudget: 4 39 | asyncUploadTimeSlice: 2 40 | asyncUploadBufferSize: 16 41 | asyncUploadPersistentBuffer: 1 42 | resolutionScalingFixedDPIFactor: 1 43 | customRenderPipeline: {fileID: 0} 44 | excludedTargetPlatforms: [] 45 | - serializedVersion: 2 46 | name: Low 47 | pixelLightCount: 0 48 | shadows: 0 49 | shadowResolution: 0 50 | shadowProjection: 1 51 | shadowCascades: 1 52 | shadowDistance: 20 53 | shadowNearPlaneOffset: 3 54 | shadowCascade2Split: 0.33333334 55 | shadowCascade4Split: {x: 0.06666667, y: 0.2, z: 0.46666667} 56 | shadowmaskMode: 0 57 | skinWeights: 2 58 | textureQuality: 0 59 | anisotropicTextures: 0 60 | antiAliasing: 0 61 | softParticles: 0 62 | softVegetation: 0 63 | realtimeReflectionProbes: 0 64 | billboardsFaceCameraPosition: 0 65 | vSyncCount: 0 66 | lodBias: 0.4 67 | maximumLODLevel: 0 68 | streamingMipmapsActive: 0 69 | streamingMipmapsAddAllCameras: 1 70 | streamingMipmapsMemoryBudget: 512 71 | streamingMipmapsRenderersPerFrame: 512 72 | streamingMipmapsMaxLevelReduction: 2 73 | streamingMipmapsMaxFileIORequests: 1024 74 | particleRaycastBudget: 16 75 | asyncUploadTimeSlice: 2 76 | asyncUploadBufferSize: 16 77 | asyncUploadPersistentBuffer: 1 78 | resolutionScalingFixedDPIFactor: 1 79 | customRenderPipeline: {fileID: 0} 80 | excludedTargetPlatforms: [] 81 | - serializedVersion: 2 82 | name: Medium 83 | pixelLightCount: 1 84 | shadows: 1 85 | shadowResolution: 0 86 | shadowProjection: 1 87 | shadowCascades: 1 88 | shadowDistance: 20 89 | shadowNearPlaneOffset: 3 90 | shadowCascade2Split: 0.33333334 91 | shadowCascade4Split: {x: 0.06666667, y: 0.2, z: 0.46666667} 92 | shadowmaskMode: 0 93 | skinWeights: 2 94 | textureQuality: 0 95 | anisotropicTextures: 1 96 | antiAliasing: 0 97 | softParticles: 0 98 | softVegetation: 0 99 | realtimeReflectionProbes: 0 100 | billboardsFaceCameraPosition: 0 101 | vSyncCount: 1 102 | lodBias: 0.7 103 | maximumLODLevel: 0 104 | streamingMipmapsActive: 0 105 | streamingMipmapsAddAllCameras: 1 106 | streamingMipmapsMemoryBudget: 512 107 | streamingMipmapsRenderersPerFrame: 512 108 | streamingMipmapsMaxLevelReduction: 2 109 | streamingMipmapsMaxFileIORequests: 1024 110 | particleRaycastBudget: 64 111 | asyncUploadTimeSlice: 2 112 | asyncUploadBufferSize: 16 113 | asyncUploadPersistentBuffer: 1 114 | resolutionScalingFixedDPIFactor: 1 115 | customRenderPipeline: {fileID: 0} 116 | excludedTargetPlatforms: [] 117 | - serializedVersion: 2 118 | name: High 119 | pixelLightCount: 2 120 | shadows: 2 121 | shadowResolution: 1 122 | shadowProjection: 1 123 | shadowCascades: 2 124 | shadowDistance: 40 125 | shadowNearPlaneOffset: 3 126 | shadowCascade2Split: 0.33333334 127 | shadowCascade4Split: {x: 0.06666667, y: 0.2, z: 0.46666667} 128 | shadowmaskMode: 1 129 | skinWeights: 2 130 | textureQuality: 0 131 | anisotropicTextures: 1 132 | antiAliasing: 0 133 | softParticles: 0 134 | softVegetation: 1 135 | realtimeReflectionProbes: 1 136 | billboardsFaceCameraPosition: 1 137 | vSyncCount: 1 138 | lodBias: 1 139 | maximumLODLevel: 0 140 | streamingMipmapsActive: 0 141 | streamingMipmapsAddAllCameras: 1 142 | streamingMipmapsMemoryBudget: 512 143 | streamingMipmapsRenderersPerFrame: 512 144 | streamingMipmapsMaxLevelReduction: 2 145 | streamingMipmapsMaxFileIORequests: 1024 146 | particleRaycastBudget: 256 147 | asyncUploadTimeSlice: 2 148 | asyncUploadBufferSize: 16 149 | asyncUploadPersistentBuffer: 1 150 | resolutionScalingFixedDPIFactor: 1 151 | customRenderPipeline: {fileID: 0} 152 | excludedTargetPlatforms: [] 153 | - serializedVersion: 2 154 | name: Very High 155 | pixelLightCount: 3 156 | shadows: 2 157 | shadowResolution: 2 158 | shadowProjection: 1 159 | shadowCascades: 2 160 | shadowDistance: 70 161 | shadowNearPlaneOffset: 3 162 | shadowCascade2Split: 0.33333334 163 | shadowCascade4Split: {x: 0.06666667, y: 0.2, z: 0.46666667} 164 | shadowmaskMode: 1 165 | skinWeights: 4 166 | textureQuality: 0 167 | anisotropicTextures: 2 168 | antiAliasing: 2 169 | softParticles: 1 170 | softVegetation: 1 171 | realtimeReflectionProbes: 1 172 | billboardsFaceCameraPosition: 1 173 | vSyncCount: 1 174 | lodBias: 1.5 175 | maximumLODLevel: 0 176 | streamingMipmapsActive: 0 177 | streamingMipmapsAddAllCameras: 1 178 | streamingMipmapsMemoryBudget: 512 179 | streamingMipmapsRenderersPerFrame: 512 180 | streamingMipmapsMaxLevelReduction: 2 181 | streamingMipmapsMaxFileIORequests: 1024 182 | particleRaycastBudget: 1024 183 | asyncUploadTimeSlice: 2 184 | asyncUploadBufferSize: 16 185 | asyncUploadPersistentBuffer: 1 186 | resolutionScalingFixedDPIFactor: 1 187 | customRenderPipeline: {fileID: 0} 188 | excludedTargetPlatforms: [] 189 | - serializedVersion: 2 190 | name: Ultra 191 | pixelLightCount: 4 192 | shadows: 2 193 | shadowResolution: 2 194 | shadowProjection: 1 195 | shadowCascades: 4 196 | shadowDistance: 150 197 | shadowNearPlaneOffset: 3 198 | shadowCascade2Split: 0.33333334 199 | shadowCascade4Split: {x: 0.06666667, y: 0.2, z: 0.46666667} 200 | shadowmaskMode: 1 201 | skinWeights: 255 202 | textureQuality: 0 203 | anisotropicTextures: 2 204 | antiAliasing: 2 205 | softParticles: 1 206 | softVegetation: 1 207 | realtimeReflectionProbes: 1 208 | billboardsFaceCameraPosition: 1 209 | vSyncCount: 1 210 | lodBias: 2 211 | maximumLODLevel: 0 212 | streamingMipmapsActive: 0 213 | streamingMipmapsAddAllCameras: 1 214 | streamingMipmapsMemoryBudget: 512 215 | streamingMipmapsRenderersPerFrame: 512 216 | streamingMipmapsMaxLevelReduction: 2 217 | streamingMipmapsMaxFileIORequests: 1024 218 | particleRaycastBudget: 4096 219 | asyncUploadTimeSlice: 2 220 | asyncUploadBufferSize: 16 221 | asyncUploadPersistentBuffer: 1 222 | resolutionScalingFixedDPIFactor: 1 223 | customRenderPipeline: {fileID: 0} 224 | excludedTargetPlatforms: [] 225 | m_PerPlatformDefaultQuality: 226 | Android: 2 227 | EmbeddedLinux: 5 228 | GameCoreScarlett: 5 229 | GameCoreXboxOne: 5 230 | LinuxHeadlessSimulation: 5 231 | Lumin: 5 232 | Nintendo Switch: 5 233 | PS4: 5 234 | PS5: 5 235 | Server: 5 236 | Stadia: 5 237 | Standalone: 5 238 | WebGL: 3 239 | Windows Store Apps: 5 240 | XboxOne: 5 241 | iPhone: 2 242 | tvOS: 2 243 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | GNU GENERAL PUBLIC LICENSE 2 | Version 2, June 1991 3 | 4 | Copyright (C) 1989, 1991 Free Software Foundation, Inc., 5 | 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 6 | Everyone is permitted to copy and distribute verbatim copies 7 | of this license document, but changing it is not allowed. 8 | 9 | Preamble 10 | 11 | The licenses for most software are designed to take away your 12 | freedom to share and change it. By contrast, the GNU General Public 13 | License is intended to guarantee your freedom to share and change free 14 | software--to make sure the software is free for all its users. This 15 | General Public License applies to most of the Free Software 16 | Foundation's software and to any other program whose authors commit to 17 | using it. (Some other Free Software Foundation software is covered by 18 | the GNU Lesser General Public License instead.) You can apply it to 19 | your programs, too. 20 | 21 | When we speak of free software, we are referring to freedom, not 22 | price. Our General Public Licenses are designed to make sure that you 23 | have the freedom to distribute copies of free software (and charge for 24 | this service if you wish), that you receive source code or can get it 25 | if you want it, that you can change the software or use pieces of it 26 | in new free programs; and that you know you can do these things. 27 | 28 | To protect your rights, we need to make restrictions that forbid 29 | anyone to deny you these rights or to ask you to surrender the rights. 30 | These restrictions translate to certain responsibilities for you if you 31 | distribute copies of the software, or if you modify it. 32 | 33 | For example, if you distribute copies of such a program, whether 34 | gratis or for a fee, you must give the recipients all the rights that 35 | you have. You must make sure that they, too, receive or can get the 36 | source code. And you must show them these terms so they know their 37 | rights. 38 | 39 | We protect your rights with two steps: (1) copyright the software, and 40 | (2) offer you this license which gives you legal permission to copy, 41 | distribute and/or modify the software. 42 | 43 | Also, for each author's protection and ours, we want to make certain 44 | that everyone understands that there is no warranty for this free 45 | software. If the software is modified by someone else and passed on, we 46 | want its recipients to know that what they have is not the original, so 47 | that any problems introduced by others will not reflect on the original 48 | authors' reputations. 49 | 50 | Finally, any free program is threatened constantly by software 51 | patents. We wish to avoid the danger that redistributors of a free 52 | program will individually obtain patent licenses, in effect making the 53 | program proprietary. To prevent this, we have made it clear that any 54 | patent must be licensed for everyone's free use or not licensed at all. 55 | 56 | The precise terms and conditions for copying, distribution and 57 | modification follow. 58 | 59 | GNU GENERAL PUBLIC LICENSE 60 | TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 61 | 62 | 0. This License applies to any program or other work which contains 63 | a notice placed by the copyright holder saying it may be distributed 64 | under the terms of this General Public License. The "Program", below, 65 | refers to any such program or work, and a "work based on the Program" 66 | means either the Program or any derivative work under copyright law: 67 | that is to say, a work containing the Program or a portion of it, 68 | either verbatim or with modifications and/or translated into another 69 | language. (Hereinafter, translation is included without limitation in 70 | the term "modification".) Each licensee is addressed as "you". 71 | 72 | Activities other than copying, distribution and modification are not 73 | covered by this License; they are outside its scope. The act of 74 | running the Program is not restricted, and the output from the Program 75 | is covered only if its contents constitute a work based on the 76 | Program (independent of having been made by running the Program). 77 | Whether that is true depends on what the Program does. 78 | 79 | 1. You may copy and distribute verbatim copies of the Program's 80 | source code as you receive it, in any medium, provided that you 81 | conspicuously and appropriately publish on each copy an appropriate 82 | copyright notice and disclaimer of warranty; keep intact all the 83 | notices that refer to this License and to the absence of any warranty; 84 | and give any other recipients of the Program a copy of this License 85 | along with the Program. 86 | 87 | You may charge a fee for the physical act of transferring a copy, and 88 | you may at your option offer warranty protection in exchange for a fee. 89 | 90 | 2. You may modify your copy or copies of the Program or any portion 91 | of it, thus forming a work based on the Program, and copy and 92 | distribute such modifications or work under the terms of Section 1 93 | above, provided that you also meet all of these conditions: 94 | 95 | a) You must cause the modified files to carry prominent notices 96 | stating that you changed the files and the date of any change. 97 | 98 | b) You must cause any work that you distribute or publish, that in 99 | whole or in part contains or is derived from the Program or any 100 | part thereof, to be licensed as a whole at no charge to all third 101 | parties under the terms of this License. 102 | 103 | c) If the modified program normally reads commands interactively 104 | when run, you must cause it, when started running for such 105 | interactive use in the most ordinary way, to print or display an 106 | announcement including an appropriate copyright notice and a 107 | notice that there is no warranty (or else, saying that you provide 108 | a warranty) and that users may redistribute the program under 109 | these conditions, and telling the user how to view a copy of this 110 | License. (Exception: if the Program itself is interactive but 111 | does not normally print such an announcement, your work based on 112 | the Program is not required to print an announcement.) 113 | 114 | These requirements apply to the modified work as a whole. If 115 | identifiable sections of that work are not derived from the Program, 116 | and can be reasonably considered independent and separate works in 117 | themselves, then this License, and its terms, do not apply to those 118 | sections when you distribute them as separate works. But when you 119 | distribute the same sections as part of a whole which is a work based 120 | on the Program, the distribution of the whole must be on the terms of 121 | this License, whose permissions for other licensees extend to the 122 | entire whole, and thus to each and every part regardless of who wrote it. 123 | 124 | Thus, it is not the intent of this section to claim rights or contest 125 | your rights to work written entirely by you; rather, the intent is to 126 | exercise the right to control the distribution of derivative or 127 | collective works based on the Program. 128 | 129 | In addition, mere aggregation of another work not based on the Program 130 | with the Program (or with a work based on the Program) on a volume of 131 | a storage or distribution medium does not bring the other work under 132 | the scope of this License. 133 | 134 | 3. You may copy and distribute the Program (or a work based on it, 135 | under Section 2) in object code or executable form under the terms of 136 | Sections 1 and 2 above provided that you also do one of the following: 137 | 138 | a) Accompany it with the complete corresponding machine-readable 139 | source code, which must be distributed under the terms of Sections 140 | 1 and 2 above on a medium customarily used for software interchange; or, 141 | 142 | b) Accompany it with a written offer, valid for at least three 143 | years, to give any third party, for a charge no more than your 144 | cost of physically performing source distribution, a complete 145 | machine-readable copy of the corresponding source code, to be 146 | distributed under the terms of Sections 1 and 2 above on a medium 147 | customarily used for software interchange; or, 148 | 149 | c) Accompany it with the information you received as to the offer 150 | to distribute corresponding source code. (This alternative is 151 | allowed only for noncommercial distribution and only if you 152 | received the program in object code or executable form with such 153 | an offer, in accord with Subsection b above.) 154 | 155 | The source code for a work means the preferred form of the work for 156 | making modifications to it. For an executable work, complete source 157 | code means all the source code for all modules it contains, plus any 158 | associated interface definition files, plus the scripts used to 159 | control compilation and installation of the executable. However, as a 160 | special exception, the source code distributed need not include 161 | anything that is normally distributed (in either source or binary 162 | form) with the major components (compiler, kernel, and so on) of the 163 | operating system on which the executable runs, unless that component 164 | itself accompanies the executable. 165 | 166 | If distribution of executable or object code is made by offering 167 | access to copy from a designated place, then offering equivalent 168 | access to copy the source code from the same place counts as 169 | distribution of the source code, even though third parties are not 170 | compelled to copy the source along with the object code. 171 | 172 | 4. You may not copy, modify, sublicense, or distribute the Program 173 | except as expressly provided under this License. Any attempt 174 | otherwise to copy, modify, sublicense or distribute the Program is 175 | void, and will automatically terminate your rights under this License. 176 | However, parties who have received copies, or rights, from you under 177 | this License will not have their licenses terminated so long as such 178 | parties remain in full compliance. 179 | 180 | 5. You are not required to accept this License, since you have not 181 | signed it. However, nothing else grants you permission to modify or 182 | distribute the Program or its derivative works. These actions are 183 | prohibited by law if you do not accept this License. Therefore, by 184 | modifying or distributing the Program (or any work based on the 185 | Program), you indicate your acceptance of this License to do so, and 186 | all its terms and conditions for copying, distributing or modifying 187 | the Program or works based on it. 188 | 189 | 6. Each time you redistribute the Program (or any work based on the 190 | Program), the recipient automatically receives a license from the 191 | original licensor to copy, distribute or modify the Program subject to 192 | these terms and conditions. You may not impose any further 193 | restrictions on the recipients' exercise of the rights granted herein. 194 | You are not responsible for enforcing compliance by third parties to 195 | this License. 196 | 197 | 7. If, as a consequence of a court judgment or allegation of patent 198 | infringement or for any other reason (not limited to patent issues), 199 | conditions are imposed on you (whether by court order, agreement or 200 | otherwise) that contradict the conditions of this License, they do not 201 | excuse you from the conditions of this License. If you cannot 202 | distribute so as to satisfy simultaneously your obligations under this 203 | License and any other pertinent obligations, then as a consequence you 204 | may not distribute the Program at all. For example, if a patent 205 | license would not permit royalty-free redistribution of the Program by 206 | all those who receive copies directly or indirectly through you, then 207 | the only way you could satisfy both it and this License would be to 208 | refrain entirely from distribution of the Program. 209 | 210 | If any portion of this section is held invalid or unenforceable under 211 | any particular circumstance, the balance of the section is intended to 212 | apply and the section as a whole is intended to apply in other 213 | circumstances. 214 | 215 | It is not the purpose of this section to induce you to infringe any 216 | patents or other property right claims or to contest validity of any 217 | such claims; this section has the sole purpose of protecting the 218 | integrity of the free software distribution system, which is 219 | implemented by public license practices. Many people have made 220 | generous contributions to the wide range of software distributed 221 | through that system in reliance on consistent application of that 222 | system; it is up to the author/donor to decide if he or she is willing 223 | to distribute software through any other system and a licensee cannot 224 | impose that choice. 225 | 226 | This section is intended to make thoroughly clear what is believed to 227 | be a consequence of the rest of this License. 228 | 229 | 8. If the distribution and/or use of the Program is restricted in 230 | certain countries either by patents or by copyrighted interfaces, the 231 | original copyright holder who places the Program under this License 232 | may add an explicit geographical distribution limitation excluding 233 | those countries, so that distribution is permitted only in or among 234 | countries not thus excluded. In such case, this License incorporates 235 | the limitation as if written in the body of this License. 236 | 237 | 9. The Free Software Foundation may publish revised and/or new versions 238 | of the General Public License from time to time. Such new versions will 239 | be similar in spirit to the present version, but may differ in detail to 240 | address new problems or concerns. 241 | 242 | Each version is given a distinguishing version number. If the Program 243 | specifies a version number of this License which applies to it and "any 244 | later version", you have the option of following the terms and conditions 245 | either of that version or of any later version published by the Free 246 | Software Foundation. If the Program does not specify a version number of 247 | this License, you may choose any version ever published by the Free Software 248 | Foundation. 249 | 250 | 10. If you wish to incorporate parts of the Program into other free 251 | programs whose distribution conditions are different, write to the author 252 | to ask for permission. For software which is copyrighted by the Free 253 | Software Foundation, write to the Free Software Foundation; we sometimes 254 | make exceptions for this. Our decision will be guided by the two goals 255 | of preserving the free status of all derivatives of our free software and 256 | of promoting the sharing and reuse of software generally. 257 | 258 | NO WARRANTY 259 | 260 | 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY 261 | FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN 262 | OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES 263 | PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED 264 | OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 265 | MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS 266 | TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE 267 | PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, 268 | REPAIR OR CORRECTION. 269 | 270 | 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING 271 | WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR 272 | REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, 273 | INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING 274 | OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED 275 | TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY 276 | YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER 277 | PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE 278 | POSSIBILITY OF SUCH DAMAGES. 279 | 280 | END OF TERMS AND CONDITIONS 281 | 282 | How to Apply These Terms to Your New Programs 283 | 284 | If you develop a new program, and you want it to be of the greatest 285 | possible use to the public, the best way to achieve this is to make it 286 | free software which everyone can redistribute and change under these terms. 287 | 288 | To do so, attach the following notices to the program. It is safest 289 | to attach them to the start of each source file to most effectively 290 | convey the exclusion of warranty; and each file should have at least 291 | the "copyright" line and a pointer to where the full notice is found. 292 | 293 | 294 | Copyright (C) 295 | 296 | This program is free software; you can redistribute it and/or modify 297 | it under the terms of the GNU General Public License as published by 298 | the Free Software Foundation; either version 2 of the License, or 299 | (at your option) any later version. 300 | 301 | This program is distributed in the hope that it will be useful, 302 | but WITHOUT ANY WARRANTY; without even the implied warranty of 303 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 304 | GNU General Public License for more details. 305 | 306 | You should have received a copy of the GNU General Public License along 307 | with this program; if not, write to the Free Software Foundation, Inc., 308 | 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. 309 | 310 | Also add information on how to contact you by electronic and paper mail. 311 | 312 | If the program is interactive, make it output a short notice like this 313 | when it starts in an interactive mode: 314 | 315 | Gnomovision version 69, Copyright (C) year name of author 316 | Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. 317 | This is free software, and you are welcome to redistribute it 318 | under certain conditions; type `show c' for details. 319 | 320 | The hypothetical commands `show w' and `show c' should show the appropriate 321 | parts of the General Public License. Of course, the commands you use may 322 | be called something other than `show w' and `show c'; they could even be 323 | mouse-clicks or menu items--whatever suits your program. 324 | 325 | You should also get your employer (if you work as a programmer) or your 326 | school, if any, to sign a "copyright disclaimer" for the program, if 327 | necessary. Here is a sample; alter the names: 328 | 329 | Yoyodyne, Inc., hereby disclaims all copyright interest in the program 330 | `Gnomovision' (which makes passes at compilers) written by James Hacker. 331 | 332 | , 1 April 1989 333 | Ty Coon, President of Vice 334 | 335 | This General Public License does not permit incorporating your program into 336 | proprietary programs. If your program is a subroutine library, you may 337 | consider it more useful to permit linking proprietary applications with the 338 | library. If this is what you want to do, use the GNU Lesser General 339 | Public License instead of this License. -------------------------------------------------------------------------------- /Assets/IntegrationGPT/Editor/GPTWindow.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.IO; 4 | using System.Linq; 5 | using System.Net; 6 | using System.Net.Sockets; 7 | using System.Text; 8 | using System.Text.RegularExpressions; 9 | using System.Threading; 10 | using UnityEditor.Scripting.Python; 11 | using UnityEngine; 12 | using Python.Runtime; 13 | 14 | namespace UnityEditor.GPT 15 | { 16 | public class GPTWindow : EditorWindow 17 | { 18 | [MenuItem("AI/GPTWindow")] 19 | public static void Open() 20 | { 21 | var win = GetWindow(); 22 | win.titleContent = new GUIContent(nameof(GPTWindow)); 23 | win.minSize = new Vector2(400, 300); 24 | win.Show(); 25 | } 26 | 27 | static GPTWindow s_Instance; 28 | 29 | public static bool EnableStreamingOutput = true; 30 | 31 | Evaluator m_Evaluator; 32 | StringBuilder m_InputBuilder; 33 | StringBuilder m_CodeBuilder; 34 | 35 | GUIStyle m_TextFieldStyle; 36 | Vector2 m_OutputPos; 37 | string m_OutputText; 38 | bool m_OnlyShowOutput; 39 | Queue m_OutputBuffer; 40 | 41 | Vector2 m_InputPos; 42 | string m_InputText; 43 | 44 | int currentFrame; 45 | AIType m_CurrentType; 46 | Config m_CurrentData; 47 | int[] m_AITypeIDs; 48 | string[] m_AITypeNames; 49 | Dictionary m_Prompts; 50 | ProcessState m_ProcessState; 51 | SynchronizationContext unitySynchronizationContext; 52 | 53 | void OnEnable() 54 | { 55 | s_Instance = this; 56 | 57 | Evaluator.Init(ref m_Evaluator); 58 | Evaluator.Instance.OnEvaluationSuccess -= OnEvaluationSuccess; 59 | Evaluator.Instance.OnEvaluationSuccess += OnEvaluationSuccess; 60 | Evaluator.Instance.OnEvaluationError -= OnEvaluationError; 61 | Evaluator.Instance.OnEvaluationError += OnEvaluationError; 62 | 63 | FilePostprocessor.TextFileChanged -= TextFileChanged; 64 | FilePostprocessor.TextFileChanged += TextFileChanged; 65 | 66 | unitySynchronizationContext = SynchronizationContext.Current; 67 | m_ProcessState = new ProcessState(); 68 | m_ProcessState.onReceivedMsg = new Action(msg => 69 | { 70 | unitySynchronizationContext.Post((d) => 71 | { 72 | AppendToOutput(msg); 73 | }, null); 74 | }); 75 | 76 | m_InputBuilder = new StringBuilder(); 77 | m_CodeBuilder = new StringBuilder(); 78 | m_OutputBuffer = new Queue(); 79 | 80 | m_AITypeIDs = Constants.DisplayNames.Keys.ToList().ConvertAll(x => (int)x).ToArray(); 81 | m_AITypeNames = Constants.DisplayNames.Values.ToArray(); 82 | 83 | InitPrompts(); 84 | } 85 | 86 | void OnDisable() 87 | { 88 | if (Evaluator.Instance != null) 89 | { 90 | Evaluator.Instance.OnEvaluationSuccess -= OnEvaluationSuccess; 91 | Evaluator.Instance.OnEvaluationError -= OnEvaluationError; 92 | } 93 | 94 | FilePostprocessor.TextFileChanged -= TextFileChanged; 95 | 96 | m_ProcessState.Kill(); 97 | m_ProcessState.Reset(); 98 | } 99 | 100 | void OnGUI() 101 | { 102 | InitStyles(); 103 | 104 | var windowSize = position.size; 105 | var execHeight = 50; 106 | var labelHeight = 16; 107 | windowSize.y -= labelHeight * 2; 108 | 109 | if (!m_OnlyShowOutput) 110 | windowSize.y -= execHeight; 111 | 112 | var outputWidth = windowSize.x; 113 | var outputHeight = windowSize.y * (m_OnlyShowOutput ? 1 : 0.5F); 114 | var inputHeight = windowSize.y * (m_OnlyShowOutput ? 0 : 0.5F); 115 | 116 | EditorGUILayout.BeginHorizontal(GUILayout.Height(labelHeight)); 117 | { 118 | EditorGUILayout.LabelField(" Output", EditorStyles.boldLabel); 119 | GUILayout.FlexibleSpace(); 120 | 121 | m_OnlyShowOutput = GUILayout.Toggle(m_OnlyShowOutput, "Only Show Output"); 122 | if (GUILayout.Button("Clear Output")) 123 | m_OutputText = string.Empty; 124 | } 125 | EditorGUILayout.EndHorizontal(); 126 | 127 | if (m_OutputBuffer.Count > 0) 128 | { 129 | m_OutputText += m_OutputBuffer.Dequeue(); 130 | m_OutputPos.y = m_TextFieldStyle.CalcHeight(new GUIContent(m_OutputText), outputWidth); 131 | if (m_OutputBuffer.Count == 0 && m_ProcessState.isFinished) 132 | { 133 | TryExecCode(m_ProcessState.recvText.ToString()); 134 | m_ProcessState.Reset(); 135 | } 136 | } 137 | 138 | m_OutputPos = EditorGUILayout.BeginScrollView(m_OutputPos, GUILayout.Height(outputHeight)); 139 | { 140 | GUILayout.TextField(m_OutputText, m_TextFieldStyle, GUILayout.ExpandHeight(true)); 141 | } 142 | EditorGUILayout.EndScrollView(); 143 | 144 | if (inputHeight > 0) 145 | { 146 | EditorGUILayout.BeginHorizontal(GUILayout.Height(labelHeight)); 147 | { 148 | EditorGUILayout.LabelField(" Input Command", EditorStyles.boldLabel); 149 | GUILayout.FlexibleSpace(); 150 | 151 | EditorGUILayout.LabelField("AI:", EditorStyles.boldLabel, GUILayout.Width(20)); 152 | GUI.changed = false; 153 | m_CurrentType = (AIType)EditorGUILayout.IntPopup((int)m_CurrentType, m_AITypeNames, m_AITypeIDs, GUILayout.Width(100)); 154 | if (GUI.changed) 155 | UpdateCurrentPromptData(); 156 | 157 | GUILayout.Space(10); 158 | 159 | EditorGUILayout.LabelField("Prompt:", EditorStyles.boldLabel, GUILayout.Width(50)); 160 | if (m_CurrentData != null) 161 | m_CurrentData.Index = EditorGUILayout.Popup(m_CurrentData.Index, m_CurrentData.Names); 162 | else 163 | EditorGUILayout.LabelField(string.Empty, EditorStyles.popup); 164 | } 165 | EditorGUILayout.EndHorizontal(); 166 | 167 | m_InputPos = EditorGUILayout.BeginScrollView(m_InputPos, GUILayout.Height(inputHeight)); 168 | { 169 | m_InputText = GUILayout.TextField(m_InputText, m_TextFieldStyle, GUILayout.ExpandHeight(true)); 170 | } 171 | EditorGUILayout.EndScrollView(); 172 | 173 | EditorGUILayout.BeginVertical(GUILayout.Height(execHeight)); 174 | { 175 | GUI.color = m_ProcessState.isProcessing ? new Color(1, 0.235F, 0.235F) : Color.white; 176 | if (GUILayout.Button(m_ProcessState.isProcessing ? "Stop Responding" : "Execute", GUILayout.Height(32))) 177 | { 178 | if (m_ProcessState.isProcessing) 179 | { 180 | m_ProcessState.SetFinish("Stopped response."); 181 | m_ProcessState.Kill(); 182 | } 183 | else 184 | { 185 | var inputText = m_InputText.Trim(); 186 | 187 | m_InputBuilder.Clear(); 188 | if (m_CurrentData != null && Constants.ApiUrlKeyNames.ContainsKey(m_CurrentType)) 189 | { 190 | m_InputBuilder.AppendLine($"import os"); 191 | m_InputBuilder.AppendLine($"os.environ['{Constants.ApiUrlKeyNames[m_CurrentType]}']='{m_CurrentData.api_url ?? string.Empty}'"); 192 | } 193 | 194 | m_InputBuilder.AppendLine($"import gpt"); 195 | m_InputBuilder.AppendLine($"gpt.set_prompt('''{m_CurrentData?.GetValue() ?? string.Empty}''')"); 196 | m_InputBuilder.AppendLine($"gpt.set_config('''{Constants.GetConfigPath(m_CurrentType)}''')"); 197 | m_InputBuilder.AppendLine($"gpt.ask_{Constants.FuncNames[m_CurrentType]}('''{inputText}''')"); 198 | 199 | AppendToOutput($"You: {inputText}\n{m_CurrentType}: "); 200 | RunScript(m_InputBuilder.ToString()); 201 | } 202 | } 203 | GUI.color = Color.white; 204 | } 205 | EditorGUILayout.EndVertical(); 206 | } 207 | 208 | if (currentFrame++ % 2 == 0) 209 | Repaint(); 210 | } 211 | 212 | void InitStyles() 213 | { 214 | if (m_TextFieldStyle == null) 215 | { 216 | m_TextFieldStyle = new GUIStyle(EditorStyles.textField); 217 | m_TextFieldStyle.richText = true; 218 | m_TextFieldStyle.wordWrap = true; 219 | } 220 | } 221 | 222 | void InitPrompts() 223 | { 224 | if (m_Prompts == null) 225 | m_Prompts = new Dictionary(); 226 | 227 | var aiTypes = Enum.GetValues(typeof(AIType)); 228 | for (int i = 0; i < aiTypes.Length; i++) 229 | { 230 | var type = (AIType)aiTypes.GetValue(i); 231 | var filePath = Constants.GetConfigPath(type); 232 | 233 | if (!File.Exists(filePath)) 234 | { 235 | m_Prompts.Remove(type); 236 | continue; 237 | } 238 | 239 | var fileContent = File.ReadAllText(filePath); 240 | try 241 | { 242 | if (!m_Prompts.TryGetValue(type, out var promptData)) 243 | { 244 | promptData = new Config(); 245 | m_Prompts.Add(type, promptData); 246 | } 247 | 248 | var config = Newtonsoft.Json.JsonConvert.DeserializeObject(fileContent); 249 | promptData.SetConfig(config); 250 | } 251 | catch (Exception ex) 252 | { 253 | Debug.LogException(ex); 254 | } 255 | } 256 | 257 | UpdateCurrentPromptData(); 258 | } 259 | 260 | void AppendToOutput(string str) 261 | { 262 | if (EnableStreamingOutput) 263 | { 264 | var dontVerbatim = str.Contains(""); 265 | if (dontVerbatim) 266 | { 267 | m_OutputBuffer.Enqueue(str); 268 | } 269 | else 270 | { 271 | foreach (var item in str) 272 | m_OutputBuffer.Enqueue(item.ToString()); 273 | } 274 | } 275 | else 276 | { 277 | m_OutputText += str; 278 | 279 | if (m_ProcessState.isFinished) 280 | m_ProcessState.Reset(); 281 | } 282 | 283 | Repaint(); 284 | GUI.FocusControl(string.Empty); 285 | } 286 | 287 | void UpdateCurrentPromptData() 288 | { 289 | m_Prompts?.TryGetValue(m_CurrentType, out m_CurrentData); 290 | } 291 | 292 | async void TryExecCode(string msg) 293 | { 294 | var match = Regex.Match(msg, @"```(?:csharp)?\s*(.*?)\s*```", RegexOptions.Singleline); 295 | if (match.Success) 296 | { 297 | var code = match.Groups[1].Value.Trim(); 298 | if (code.StartsWith("using")) 299 | { 300 | try 301 | { 302 | await Evaluator.Instance.Evaluate(code); 303 | } 304 | catch (Exception ex) 305 | { 306 | Debug.LogError("代码编译失败, 请检查原代码块.(Code compilation error, please check the original code block.)"); 307 | Debug.LogException(ex); 308 | } 309 | } 310 | } 311 | } 312 | 313 | void OnEvaluationError(string output, Microsoft.CodeAnalysis.Scripting.CompilationErrorException error) 314 | { 315 | Debug.LogError(output); 316 | Debug.LogException(error); 317 | } 318 | 319 | async void OnEvaluationSuccess(object output) 320 | { 321 | try 322 | { 323 | var error = await Evaluator.Instance.EvaluateSilently("var method = typeof(TemplateClass).GetMethod(\"Test\"," + 324 | "System.Reflection.BindingFlags.Public | System.Reflection.BindingFlags.Static);" + 325 | "method?.Invoke(null, null);"); 326 | if (error != null) 327 | throw error; 328 | } 329 | catch (Exception ex) 330 | { 331 | Debug.LogError("代码执行失败, 请检查原代码块.(Code execution error, please check the original code block.)"); 332 | Debug.LogException(ex); 333 | } 334 | } 335 | 336 | void TextFileChanged() 337 | { 338 | InitPrompts(); 339 | } 340 | 341 | void RunScript(string code) 342 | { 343 | PythonRunner.EnsureInitialized(); 344 | using (Py.GIL()) 345 | { 346 | m_CodeBuilder.Clear(); 347 | m_CodeBuilder.AppendLine("import sys"); 348 | m_CodeBuilder.AppendLine("import os"); 349 | 350 | var packagePaths = PythonSettings.GetSitePackages().ToList().ConvertAll(x => Path.Combine(Application.dataPath.Replace("Assets", string.Empty), x).Replace("\\", "/")); 351 | foreach (var item in packagePaths) 352 | m_CodeBuilder.AppendLine($"sys.path.append('{item}')"); 353 | 354 | var scriptsAssemblies = Path.GetFullPath("Library/ScriptAssemblies"); 355 | scriptsAssemblies = scriptsAssemblies.Replace("\\", "/"); 356 | m_CodeBuilder.AppendLine($"sys.path.append('{scriptsAssemblies}')"); 357 | 358 | m_CodeBuilder.AppendLine($"os.environ['GPT_PATH']='{packagePaths[1]}'"); 359 | m_CodeBuilder.AppendLine(code); 360 | 361 | var codeFileName = "Temp/template.py"; 362 | File.WriteAllText(codeFileName, m_CodeBuilder.ToString(), Encoding.UTF8); 363 | 364 | var args = new List 365 | { 366 | $"\"{codeFileName}\"" 367 | }; 368 | 369 | var environments = new Dictionary(); 370 | if (!string.IsNullOrEmpty(m_CurrentData?.proxy)) 371 | environments.Add("all_proxy", m_CurrentData.proxy); 372 | 373 | m_ProcessState.Kill(); 374 | m_ProcessState.SetStart(); 375 | m_ProcessState.process = PythonRunner.SpawnPythonProcess(args, environments, false, false, true, true); 376 | 377 | //// debug code 378 | //var process = m_ProcessState.process; 379 | //process.WaitForExit(); 380 | //var retcode = process.ExitCode; 381 | 382 | //if (retcode != 0) 383 | //{ 384 | // var output = process.StandardOutput.ReadToEnd(); 385 | // var errors = process.StandardError.ReadToEnd(); 386 | // Debug.LogError(errors); 387 | // Debug.LogError(output); 388 | //} 389 | } 390 | } 391 | } 392 | 393 | public enum AIType 394 | { 395 | ChatGPT = 0, 396 | Bing, 397 | Bard, 398 | } 399 | 400 | [Serializable] 401 | class Config 402 | { 403 | // json key 404 | public string api_url; 405 | public string proxy; 406 | public Dictionary prompts; 407 | 408 | // internal field 409 | public int Index; 410 | public string[] Names; 411 | 412 | public void SetConfig(Config config) 413 | { 414 | // copy 415 | api_url = config.api_url; 416 | proxy = config.proxy; 417 | prompts = config.prompts; 418 | 419 | // init 420 | Names = prompts.Keys.ToArray(); 421 | if (Index < 0 || Index >= Names.Length) 422 | Index = 0; 423 | } 424 | 425 | public string GetValue() 426 | { 427 | var index = Index; 428 | if (index >= 0 && index < Names.Length) 429 | { 430 | var name = Names[index]; 431 | prompts.TryGetValue(name, out var value); 432 | return value; 433 | } 434 | 435 | return string.Empty; 436 | } 437 | } 438 | 439 | class Constants 440 | { 441 | public static string GPTPath => Path.Combine(Application.dataPath, "IntegrationGPT"); 442 | public static string ConfigPath => Path.Combine(GPTPath, "Config~"); 443 | 444 | public static Dictionary DisplayNames => new Dictionary() 445 | { 446 | { AIType.ChatGPT, "ChatGPT" }, 447 | { AIType.Bing, "New Bing" }, 448 | { AIType.Bard, "Google Bard" }, 449 | }; 450 | 451 | public static Dictionary FuncNames => new Dictionary() 452 | { 453 | { AIType.ChatGPT, "chat_gpt" }, 454 | { AIType.Bing, "bing" }, 455 | { AIType.Bard, "bard" }, 456 | }; 457 | 458 | public static Dictionary ConfigNames => new Dictionary 459 | { 460 | { AIType.ChatGPT, "chat_gpt_config.json" }, 461 | { AIType.Bing, "new_bing_config.json" }, 462 | { AIType.Bard, "google_bard_config.json" }, 463 | }; 464 | 465 | public static Dictionary ApiUrlKeyNames = new Dictionary() 466 | { 467 | { AIType.ChatGPT, "API_URL" }, 468 | { AIType.Bing, "BING_PROXY_URL" }, 469 | }; 470 | 471 | public static string GetConfigPath(AIType type) 472 | { 473 | var configName = ConfigNames[type]; 474 | return Path.Join(ConfigPath, configName).Replace("\\", "/"); 475 | } 476 | } 477 | 478 | class ProcessState 479 | { 480 | public System.Diagnostics.Process process; 481 | public bool isProcessing; 482 | public bool isFinished; 483 | public StringBuilder recvText; 484 | public Action onReceivedMsg; 485 | 486 | Thread thread; 487 | Socket socket; 488 | 489 | public ProcessState() 490 | { 491 | recvText = new StringBuilder(); 492 | } 493 | 494 | public void SetStart() 495 | { 496 | Reset(); 497 | isProcessing = true; 498 | recvText.Clear(); 499 | 500 | StartThread(); 501 | } 502 | 503 | public void SetFinish(string msg = "") 504 | { 505 | onReceivedMsg?.Invoke(msg + "\n\n"); 506 | isFinished = true; 507 | } 508 | 509 | public void Reset() 510 | { 511 | isProcessing = false; 512 | isFinished = false; 513 | 514 | StopThread(); 515 | } 516 | 517 | public void Kill() 518 | { 519 | if (process != null && !process.HasExited) 520 | process.Kill(); 521 | 522 | StopThread(); 523 | } 524 | 525 | void StartThread() 526 | { 527 | socket = new Socket(AddressFamily.InterNetwork, SocketType.Stream, ProtocolType.Tcp); 528 | thread = new Thread(new ParameterizedThreadStart(StartListener)); 529 | thread.Start(socket); 530 | } 531 | 532 | void StopThread() 533 | { 534 | try 535 | { 536 | socket.Close(); 537 | socket = null; 538 | } 539 | catch { } 540 | 541 | try 542 | { 543 | thread?.Abort(); 544 | thread = null; 545 | } 546 | catch { } 547 | } 548 | 549 | void StartListener(object obj) 550 | { 551 | var listener = obj as Socket; 552 | var localEndPoint = new IPEndPoint(IPAddress.Any, 10086); 553 | listener.Bind(localEndPoint); 554 | listener.Listen(1); 555 | 556 | //Debug.Log("waiting"); 557 | 558 | var handler = listener.Accept(); 559 | var buffer = new byte[1024]; 560 | 561 | //Debug.Log("connected"); 562 | 563 | while (true) 564 | { 565 | var bytesReceived = handler.Receive(buffer); 566 | if (bytesReceived == 0) 567 | { 568 | SetFinish(); 569 | break; 570 | } 571 | else 572 | { 573 | var message = Encoding.UTF8.GetString(buffer, 0, bytesReceived); 574 | recvText.Append(message); 575 | onReceivedMsg?.Invoke(message); 576 | } 577 | } 578 | 579 | handler.Shutdown(SocketShutdown.Both); 580 | handler.Close(); 581 | } 582 | } 583 | 584 | [InitializeOnLoad] 585 | class FilePostprocessor 586 | { 587 | public static event Action TextFileChanged; 588 | 589 | static SynchronizationContext unitySynchronizationContext; 590 | static FileSystemWatcher watcher; 591 | 592 | static FilePostprocessor() 593 | { 594 | unitySynchronizationContext = SynchronizationContext.Current; 595 | 596 | watcher = new FileSystemWatcher(Constants.ConfigPath, "*.*"); 597 | watcher.Changed += OnFileChanged; 598 | watcher.EnableRaisingEvents = true; 599 | } 600 | 601 | static void OnFileChanged(object sender, FileSystemEventArgs e) 602 | { 603 | unitySynchronizationContext.Post(d => 604 | { 605 | TextFileChanged?.Invoke(); 606 | }, null); 607 | } 608 | } 609 | } -------------------------------------------------------------------------------- /ProjectSettings/ProjectSettings.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!129 &1 4 | PlayerSettings: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 23 7 | productGUID: 6477082292bf4c94d8ce52325aac3b70 8 | AndroidProfiler: 0 9 | AndroidFilterTouchesWhenObscured: 0 10 | AndroidEnableSustainedPerformanceMode: 0 11 | defaultScreenOrientation: 4 12 | targetDevice: 2 13 | useOnDemandResources: 0 14 | accelerometerFrequency: 60 15 | companyName: DefaultCompany 16 | productName: UniGPT 17 | defaultCursor: {fileID: 0} 18 | cursorHotspot: {x: 0, y: 0} 19 | m_SplashScreenBackgroundColor: {r: 0.12156863, g: 0.12156863, b: 0.1254902, a: 1} 20 | m_ShowUnitySplashScreen: 1 21 | m_ShowUnitySplashLogo: 1 22 | m_SplashScreenOverlayOpacity: 1 23 | m_SplashScreenAnimation: 1 24 | m_SplashScreenLogoStyle: 1 25 | m_SplashScreenDrawMode: 0 26 | m_SplashScreenBackgroundAnimationZoom: 1 27 | m_SplashScreenLogoAnimationZoom: 1 28 | m_SplashScreenBackgroundLandscapeAspect: 1 29 | m_SplashScreenBackgroundPortraitAspect: 1 30 | m_SplashScreenBackgroundLandscapeUvs: 31 | serializedVersion: 2 32 | x: 0 33 | y: 0 34 | width: 1 35 | height: 1 36 | m_SplashScreenBackgroundPortraitUvs: 37 | serializedVersion: 2 38 | x: 0 39 | y: 0 40 | width: 1 41 | height: 1 42 | m_SplashScreenLogos: [] 43 | m_VirtualRealitySplashScreen: {fileID: 0} 44 | m_HolographicTrackingLossScreen: {fileID: 0} 45 | defaultScreenWidth: 1920 46 | defaultScreenHeight: 1080 47 | defaultScreenWidthWeb: 960 48 | defaultScreenHeightWeb: 600 49 | m_StereoRenderingPath: 0 50 | m_ActiveColorSpace: 0 51 | m_MTRendering: 1 52 | mipStripping: 0 53 | numberOfMipsStripped: 0 54 | m_StackTraceTypes: 010000000100000001000000010000000100000001000000 55 | iosShowActivityIndicatorOnLoading: -1 56 | androidShowActivityIndicatorOnLoading: -1 57 | iosUseCustomAppBackgroundBehavior: 0 58 | iosAllowHTTPDownload: 1 59 | allowedAutorotateToPortrait: 1 60 | allowedAutorotateToPortraitUpsideDown: 1 61 | allowedAutorotateToLandscapeRight: 1 62 | allowedAutorotateToLandscapeLeft: 1 63 | useOSAutorotation: 1 64 | use32BitDisplayBuffer: 1 65 | preserveFramebufferAlpha: 0 66 | disableDepthAndStencilBuffers: 0 67 | androidStartInFullscreen: 1 68 | androidRenderOutsideSafeArea: 1 69 | androidUseSwappy: 1 70 | androidBlitType: 0 71 | androidResizableWindow: 0 72 | androidDefaultWindowWidth: 1920 73 | androidDefaultWindowHeight: 1080 74 | androidMinimumWindowWidth: 400 75 | androidMinimumWindowHeight: 300 76 | androidFullscreenMode: 1 77 | defaultIsNativeResolution: 1 78 | macRetinaSupport: 1 79 | runInBackground: 0 80 | captureSingleScreen: 0 81 | muteOtherAudioSources: 0 82 | Prepare IOS For Recording: 0 83 | Force IOS Speakers When Recording: 0 84 | deferSystemGesturesMode: 0 85 | hideHomeButton: 0 86 | submitAnalytics: 1 87 | usePlayerLog: 1 88 | bakeCollisionMeshes: 0 89 | forceSingleInstance: 0 90 | useFlipModelSwapchain: 1 91 | resizableWindow: 0 92 | useMacAppStoreValidation: 0 93 | macAppStoreCategory: public.app-category.games 94 | gpuSkinning: 0 95 | xboxPIXTextureCapture: 0 96 | xboxEnableAvatar: 0 97 | xboxEnableKinect: 0 98 | xboxEnableKinectAutoTracking: 0 99 | xboxEnableFitness: 0 100 | visibleInBackground: 1 101 | allowFullscreenSwitch: 1 102 | fullscreenMode: 1 103 | xboxSpeechDB: 0 104 | xboxEnableHeadOrientation: 0 105 | xboxEnableGuest: 0 106 | xboxEnablePIXSampling: 0 107 | metalFramebufferOnly: 0 108 | xboxOneResolution: 0 109 | xboxOneSResolution: 0 110 | xboxOneXResolution: 3 111 | xboxOneMonoLoggingLevel: 0 112 | xboxOneLoggingLevel: 1 113 | xboxOneDisableEsram: 0 114 | xboxOneEnableTypeOptimization: 0 115 | xboxOnePresentImmediateThreshold: 0 116 | switchQueueCommandMemory: 1048576 117 | switchQueueControlMemory: 16384 118 | switchQueueComputeMemory: 262144 119 | switchNVNShaderPoolsGranularity: 33554432 120 | switchNVNDefaultPoolsGranularity: 16777216 121 | switchNVNOtherPoolsGranularity: 16777216 122 | switchNVNMaxPublicTextureIDCount: 0 123 | switchNVNMaxPublicSamplerIDCount: 0 124 | stadiaPresentMode: 0 125 | stadiaTargetFramerate: 0 126 | vulkanNumSwapchainBuffers: 3 127 | vulkanEnableSetSRGBWrite: 0 128 | vulkanEnablePreTransform: 0 129 | vulkanEnableLateAcquireNextImage: 0 130 | vulkanEnableCommandBufferRecycling: 1 131 | m_SupportedAspectRatios: 132 | 4:3: 1 133 | 5:4: 1 134 | 16:10: 1 135 | 16:9: 1 136 | Others: 1 137 | bundleVersion: 1.0 138 | preloadedAssets: [] 139 | metroInputSource: 0 140 | wsaTransparentSwapchain: 0 141 | m_HolographicPauseOnTrackingLoss: 1 142 | xboxOneDisableKinectGpuReservation: 1 143 | xboxOneEnable7thCore: 1 144 | vrSettings: 145 | enable360StereoCapture: 0 146 | isWsaHolographicRemotingEnabled: 0 147 | enableFrameTimingStats: 0 148 | enableOpenGLProfilerGPURecorders: 1 149 | useHDRDisplay: 0 150 | D3DHDRBitDepth: 0 151 | m_ColorGamuts: 00000000 152 | targetPixelDensity: 30 153 | resolutionScalingMode: 0 154 | resetResolutionOnWindowResize: 0 155 | androidSupportedAspectRatio: 1 156 | androidMaxAspectRatio: 2.1 157 | applicationIdentifier: {} 158 | buildNumber: 159 | Standalone: 0 160 | iPhone: 0 161 | tvOS: 0 162 | overrideDefaultApplicationIdentifier: 0 163 | AndroidBundleVersionCode: 1 164 | AndroidMinSdkVersion: 22 165 | AndroidTargetSdkVersion: 0 166 | AndroidPreferredInstallLocation: 1 167 | aotOptions: 168 | stripEngineCode: 1 169 | iPhoneStrippingLevel: 0 170 | iPhoneScriptCallOptimization: 0 171 | ForceInternetPermission: 0 172 | ForceSDCardPermission: 0 173 | CreateWallpaper: 0 174 | APKExpansionFiles: 0 175 | keepLoadedShadersAlive: 0 176 | StripUnusedMeshComponents: 0 177 | VertexChannelCompressionMask: 4054 178 | iPhoneSdkVersion: 988 179 | iOSTargetOSVersionString: 11.0 180 | tvOSSdkVersion: 0 181 | tvOSRequireExtendedGameController: 0 182 | tvOSTargetOSVersionString: 11.0 183 | uIPrerenderedIcon: 0 184 | uIRequiresPersistentWiFi: 0 185 | uIRequiresFullScreen: 1 186 | uIStatusBarHidden: 1 187 | uIExitOnSuspend: 0 188 | uIStatusBarStyle: 0 189 | appleTVSplashScreen: {fileID: 0} 190 | appleTVSplashScreen2x: {fileID: 0} 191 | tvOSSmallIconLayers: [] 192 | tvOSSmallIconLayers2x: [] 193 | tvOSLargeIconLayers: [] 194 | tvOSLargeIconLayers2x: [] 195 | tvOSTopShelfImageLayers: [] 196 | tvOSTopShelfImageLayers2x: [] 197 | tvOSTopShelfImageWideLayers: [] 198 | tvOSTopShelfImageWideLayers2x: [] 199 | iOSLaunchScreenType: 0 200 | iOSLaunchScreenPortrait: {fileID: 0} 201 | iOSLaunchScreenLandscape: {fileID: 0} 202 | iOSLaunchScreenBackgroundColor: 203 | serializedVersion: 2 204 | rgba: 0 205 | iOSLaunchScreenFillPct: 100 206 | iOSLaunchScreenSize: 100 207 | iOSLaunchScreenCustomXibPath: 208 | iOSLaunchScreeniPadType: 0 209 | iOSLaunchScreeniPadImage: {fileID: 0} 210 | iOSLaunchScreeniPadBackgroundColor: 211 | serializedVersion: 2 212 | rgba: 0 213 | iOSLaunchScreeniPadFillPct: 100 214 | iOSLaunchScreeniPadSize: 100 215 | iOSLaunchScreeniPadCustomXibPath: 216 | iOSLaunchScreenCustomStoryboardPath: 217 | iOSLaunchScreeniPadCustomStoryboardPath: 218 | iOSDeviceRequirements: [] 219 | iOSURLSchemes: [] 220 | macOSURLSchemes: [] 221 | iOSBackgroundModes: 0 222 | iOSMetalForceHardShadows: 0 223 | metalEditorSupport: 1 224 | metalAPIValidation: 1 225 | iOSRenderExtraFrameOnPause: 0 226 | iosCopyPluginsCodeInsteadOfSymlink: 0 227 | appleDeveloperTeamID: 228 | iOSManualSigningProvisioningProfileID: 229 | tvOSManualSigningProvisioningProfileID: 230 | iOSManualSigningProvisioningProfileType: 0 231 | tvOSManualSigningProvisioningProfileType: 0 232 | appleEnableAutomaticSigning: 0 233 | iOSRequireARKit: 0 234 | iOSAutomaticallyDetectAndAddCapabilities: 1 235 | appleEnableProMotion: 0 236 | shaderPrecisionModel: 0 237 | clonedFromGUID: 00000000000000000000000000000000 238 | templatePackageId: 239 | templateDefaultScene: 240 | useCustomMainManifest: 0 241 | useCustomLauncherManifest: 0 242 | useCustomMainGradleTemplate: 0 243 | useCustomLauncherGradleManifest: 0 244 | useCustomBaseGradleTemplate: 0 245 | useCustomGradlePropertiesTemplate: 0 246 | useCustomProguardFile: 0 247 | AndroidTargetArchitectures: 1 248 | AndroidTargetDevices: 0 249 | AndroidSplashScreenScale: 0 250 | androidSplashScreen: {fileID: 0} 251 | AndroidKeystoreName: 252 | AndroidKeyaliasName: 253 | AndroidBuildApkPerCpuArchitecture: 0 254 | AndroidTVCompatibility: 0 255 | AndroidIsGame: 1 256 | AndroidEnableTango: 0 257 | androidEnableBanner: 1 258 | androidUseLowAccuracyLocation: 0 259 | androidUseCustomKeystore: 0 260 | m_AndroidBanners: 261 | - width: 320 262 | height: 180 263 | banner: {fileID: 0} 264 | androidGamepadSupportLevel: 0 265 | chromeosInputEmulation: 1 266 | AndroidMinifyWithR8: 0 267 | AndroidMinifyRelease: 0 268 | AndroidMinifyDebug: 0 269 | AndroidValidateAppBundleSize: 1 270 | AndroidAppBundleSizeToValidate: 150 271 | m_BuildTargetIcons: [] 272 | m_BuildTargetPlatformIcons: 273 | - m_BuildTarget: Android 274 | m_Icons: 275 | - m_Textures: [] 276 | m_Width: 432 277 | m_Height: 432 278 | m_Kind: 2 279 | m_SubKind: 280 | - m_Textures: [] 281 | m_Width: 324 282 | m_Height: 324 283 | m_Kind: 2 284 | m_SubKind: 285 | - m_Textures: [] 286 | m_Width: 216 287 | m_Height: 216 288 | m_Kind: 2 289 | m_SubKind: 290 | - m_Textures: [] 291 | m_Width: 162 292 | m_Height: 162 293 | m_Kind: 2 294 | m_SubKind: 295 | - m_Textures: [] 296 | m_Width: 108 297 | m_Height: 108 298 | m_Kind: 2 299 | m_SubKind: 300 | - m_Textures: [] 301 | m_Width: 81 302 | m_Height: 81 303 | m_Kind: 2 304 | m_SubKind: 305 | - m_Textures: [] 306 | m_Width: 192 307 | m_Height: 192 308 | m_Kind: 1 309 | m_SubKind: 310 | - m_Textures: [] 311 | m_Width: 144 312 | m_Height: 144 313 | m_Kind: 1 314 | m_SubKind: 315 | - m_Textures: [] 316 | m_Width: 96 317 | m_Height: 96 318 | m_Kind: 1 319 | m_SubKind: 320 | - m_Textures: [] 321 | m_Width: 72 322 | m_Height: 72 323 | m_Kind: 1 324 | m_SubKind: 325 | - m_Textures: [] 326 | m_Width: 48 327 | m_Height: 48 328 | m_Kind: 1 329 | m_SubKind: 330 | - m_Textures: [] 331 | m_Width: 36 332 | m_Height: 36 333 | m_Kind: 1 334 | m_SubKind: 335 | - m_Textures: [] 336 | m_Width: 192 337 | m_Height: 192 338 | m_Kind: 0 339 | m_SubKind: 340 | - m_Textures: [] 341 | m_Width: 144 342 | m_Height: 144 343 | m_Kind: 0 344 | m_SubKind: 345 | - m_Textures: [] 346 | m_Width: 96 347 | m_Height: 96 348 | m_Kind: 0 349 | m_SubKind: 350 | - m_Textures: [] 351 | m_Width: 72 352 | m_Height: 72 353 | m_Kind: 0 354 | m_SubKind: 355 | - m_Textures: [] 356 | m_Width: 48 357 | m_Height: 48 358 | m_Kind: 0 359 | m_SubKind: 360 | - m_Textures: [] 361 | m_Width: 36 362 | m_Height: 36 363 | m_Kind: 0 364 | m_SubKind: 365 | - m_BuildTarget: iPhone 366 | m_Icons: 367 | - m_Textures: [] 368 | m_Width: 180 369 | m_Height: 180 370 | m_Kind: 0 371 | m_SubKind: iPhone 372 | - m_Textures: [] 373 | m_Width: 120 374 | m_Height: 120 375 | m_Kind: 0 376 | m_SubKind: iPhone 377 | - m_Textures: [] 378 | m_Width: 167 379 | m_Height: 167 380 | m_Kind: 0 381 | m_SubKind: iPad 382 | - m_Textures: [] 383 | m_Width: 152 384 | m_Height: 152 385 | m_Kind: 0 386 | m_SubKind: iPad 387 | - m_Textures: [] 388 | m_Width: 76 389 | m_Height: 76 390 | m_Kind: 0 391 | m_SubKind: iPad 392 | - m_Textures: [] 393 | m_Width: 120 394 | m_Height: 120 395 | m_Kind: 3 396 | m_SubKind: iPhone 397 | - m_Textures: [] 398 | m_Width: 80 399 | m_Height: 80 400 | m_Kind: 3 401 | m_SubKind: iPhone 402 | - m_Textures: [] 403 | m_Width: 80 404 | m_Height: 80 405 | m_Kind: 3 406 | m_SubKind: iPad 407 | - m_Textures: [] 408 | m_Width: 40 409 | m_Height: 40 410 | m_Kind: 3 411 | m_SubKind: iPad 412 | - m_Textures: [] 413 | m_Width: 87 414 | m_Height: 87 415 | m_Kind: 1 416 | m_SubKind: iPhone 417 | - m_Textures: [] 418 | m_Width: 58 419 | m_Height: 58 420 | m_Kind: 1 421 | m_SubKind: iPhone 422 | - m_Textures: [] 423 | m_Width: 29 424 | m_Height: 29 425 | m_Kind: 1 426 | m_SubKind: iPhone 427 | - m_Textures: [] 428 | m_Width: 58 429 | m_Height: 58 430 | m_Kind: 1 431 | m_SubKind: iPad 432 | - m_Textures: [] 433 | m_Width: 29 434 | m_Height: 29 435 | m_Kind: 1 436 | m_SubKind: iPad 437 | - m_Textures: [] 438 | m_Width: 60 439 | m_Height: 60 440 | m_Kind: 2 441 | m_SubKind: iPhone 442 | - m_Textures: [] 443 | m_Width: 40 444 | m_Height: 40 445 | m_Kind: 2 446 | m_SubKind: iPhone 447 | - m_Textures: [] 448 | m_Width: 40 449 | m_Height: 40 450 | m_Kind: 2 451 | m_SubKind: iPad 452 | - m_Textures: [] 453 | m_Width: 20 454 | m_Height: 20 455 | m_Kind: 2 456 | m_SubKind: iPad 457 | - m_Textures: [] 458 | m_Width: 1024 459 | m_Height: 1024 460 | m_Kind: 4 461 | m_SubKind: App Store 462 | m_BuildTargetBatching: [] 463 | m_BuildTargetShaderSettings: [] 464 | m_BuildTargetGraphicsJobs: [] 465 | m_BuildTargetGraphicsJobMode: [] 466 | m_BuildTargetGraphicsAPIs: [] 467 | m_BuildTargetVRSettings: [] 468 | m_DefaultShaderChunkSizeInMB: 16 469 | m_DefaultShaderChunkCount: 0 470 | openGLRequireES31: 0 471 | openGLRequireES31AEP: 0 472 | openGLRequireES32: 0 473 | m_TemplateCustomTags: {} 474 | mobileMTRendering: 475 | Android: 1 476 | iPhone: 1 477 | tvOS: 1 478 | m_BuildTargetGroupLightmapEncodingQuality: [] 479 | m_BuildTargetGroupLightmapSettings: [] 480 | m_BuildTargetNormalMapEncoding: [] 481 | m_BuildTargetDefaultTextureCompressionFormat: [] 482 | playModeTestRunnerEnabled: 0 483 | runPlayModeTestAsEditModeTest: 0 484 | actionOnDotNetUnhandledException: 1 485 | enableInternalProfiler: 0 486 | logObjCUncaughtExceptions: 1 487 | enableCrashReportAPI: 0 488 | cameraUsageDescription: 489 | locationUsageDescription: 490 | microphoneUsageDescription: 491 | bluetoothUsageDescription: 492 | switchNMETAOverride: 493 | switchNetLibKey: 494 | switchSocketMemoryPoolSize: 6144 495 | switchSocketAllocatorPoolSize: 128 496 | switchSocketConcurrencyLimit: 14 497 | switchScreenResolutionBehavior: 2 498 | switchUseCPUProfiler: 0 499 | switchUseGOLDLinker: 0 500 | switchLTOSetting: 0 501 | switchApplicationID: 0x01004b9000490000 502 | switchNSODependencies: 503 | switchTitleNames_0: 504 | switchTitleNames_1: 505 | switchTitleNames_2: 506 | switchTitleNames_3: 507 | switchTitleNames_4: 508 | switchTitleNames_5: 509 | switchTitleNames_6: 510 | switchTitleNames_7: 511 | switchTitleNames_8: 512 | switchTitleNames_9: 513 | switchTitleNames_10: 514 | switchTitleNames_11: 515 | switchTitleNames_12: 516 | switchTitleNames_13: 517 | switchTitleNames_14: 518 | switchTitleNames_15: 519 | switchPublisherNames_0: 520 | switchPublisherNames_1: 521 | switchPublisherNames_2: 522 | switchPublisherNames_3: 523 | switchPublisherNames_4: 524 | switchPublisherNames_5: 525 | switchPublisherNames_6: 526 | switchPublisherNames_7: 527 | switchPublisherNames_8: 528 | switchPublisherNames_9: 529 | switchPublisherNames_10: 530 | switchPublisherNames_11: 531 | switchPublisherNames_12: 532 | switchPublisherNames_13: 533 | switchPublisherNames_14: 534 | switchPublisherNames_15: 535 | switchIcons_0: {fileID: 0} 536 | switchIcons_1: {fileID: 0} 537 | switchIcons_2: {fileID: 0} 538 | switchIcons_3: {fileID: 0} 539 | switchIcons_4: {fileID: 0} 540 | switchIcons_5: {fileID: 0} 541 | switchIcons_6: {fileID: 0} 542 | switchIcons_7: {fileID: 0} 543 | switchIcons_8: {fileID: 0} 544 | switchIcons_9: {fileID: 0} 545 | switchIcons_10: {fileID: 0} 546 | switchIcons_11: {fileID: 0} 547 | switchIcons_12: {fileID: 0} 548 | switchIcons_13: {fileID: 0} 549 | switchIcons_14: {fileID: 0} 550 | switchIcons_15: {fileID: 0} 551 | switchSmallIcons_0: {fileID: 0} 552 | switchSmallIcons_1: {fileID: 0} 553 | switchSmallIcons_2: {fileID: 0} 554 | switchSmallIcons_3: {fileID: 0} 555 | switchSmallIcons_4: {fileID: 0} 556 | switchSmallIcons_5: {fileID: 0} 557 | switchSmallIcons_6: {fileID: 0} 558 | switchSmallIcons_7: {fileID: 0} 559 | switchSmallIcons_8: {fileID: 0} 560 | switchSmallIcons_9: {fileID: 0} 561 | switchSmallIcons_10: {fileID: 0} 562 | switchSmallIcons_11: {fileID: 0} 563 | switchSmallIcons_12: {fileID: 0} 564 | switchSmallIcons_13: {fileID: 0} 565 | switchSmallIcons_14: {fileID: 0} 566 | switchSmallIcons_15: {fileID: 0} 567 | switchManualHTML: 568 | switchAccessibleURLs: 569 | switchLegalInformation: 570 | switchMainThreadStackSize: 1048576 571 | switchPresenceGroupId: 572 | switchLogoHandling: 0 573 | switchReleaseVersion: 0 574 | switchDisplayVersion: 1.0.0 575 | switchStartupUserAccount: 0 576 | switchTouchScreenUsage: 0 577 | switchSupportedLanguagesMask: 0 578 | switchLogoType: 0 579 | switchApplicationErrorCodeCategory: 580 | switchUserAccountSaveDataSize: 0 581 | switchUserAccountSaveDataJournalSize: 0 582 | switchApplicationAttribute: 0 583 | switchCardSpecSize: -1 584 | switchCardSpecClock: -1 585 | switchRatingsMask: 0 586 | switchRatingsInt_0: 0 587 | switchRatingsInt_1: 0 588 | switchRatingsInt_2: 0 589 | switchRatingsInt_3: 0 590 | switchRatingsInt_4: 0 591 | switchRatingsInt_5: 0 592 | switchRatingsInt_6: 0 593 | switchRatingsInt_7: 0 594 | switchRatingsInt_8: 0 595 | switchRatingsInt_9: 0 596 | switchRatingsInt_10: 0 597 | switchRatingsInt_11: 0 598 | switchRatingsInt_12: 0 599 | switchLocalCommunicationIds_0: 600 | switchLocalCommunicationIds_1: 601 | switchLocalCommunicationIds_2: 602 | switchLocalCommunicationIds_3: 603 | switchLocalCommunicationIds_4: 604 | switchLocalCommunicationIds_5: 605 | switchLocalCommunicationIds_6: 606 | switchLocalCommunicationIds_7: 607 | switchParentalControl: 0 608 | switchAllowsScreenshot: 1 609 | switchAllowsVideoCapturing: 1 610 | switchAllowsRuntimeAddOnContentInstall: 0 611 | switchDataLossConfirmation: 0 612 | switchUserAccountLockEnabled: 0 613 | switchSystemResourceMemory: 16777216 614 | switchSupportedNpadStyles: 22 615 | switchNativeFsCacheSize: 32 616 | switchIsHoldTypeHorizontal: 0 617 | switchSupportedNpadCount: 8 618 | switchSocketConfigEnabled: 0 619 | switchTcpInitialSendBufferSize: 32 620 | switchTcpInitialReceiveBufferSize: 64 621 | switchTcpAutoSendBufferSizeMax: 256 622 | switchTcpAutoReceiveBufferSizeMax: 256 623 | switchUdpSendBufferSize: 9 624 | switchUdpReceiveBufferSize: 42 625 | switchSocketBufferEfficiency: 4 626 | switchSocketInitializeEnabled: 1 627 | switchNetworkInterfaceManagerInitializeEnabled: 1 628 | switchPlayerConnectionEnabled: 1 629 | switchUseNewStyleFilepaths: 0 630 | switchUseMicroSleepForYield: 1 631 | switchEnableRamDiskSupport: 0 632 | switchMicroSleepForYieldTime: 25 633 | switchRamDiskSpaceSize: 12 634 | ps4NPAgeRating: 12 635 | ps4NPTitleSecret: 636 | ps4NPTrophyPackPath: 637 | ps4ParentalLevel: 11 638 | ps4ContentID: ED1633-NPXX51362_00-0000000000000000 639 | ps4Category: 0 640 | ps4MasterVersion: 01.00 641 | ps4AppVersion: 01.00 642 | ps4AppType: 0 643 | ps4ParamSfxPath: 644 | ps4VideoOutPixelFormat: 0 645 | ps4VideoOutInitialWidth: 1920 646 | ps4VideoOutBaseModeInitialWidth: 1920 647 | ps4VideoOutReprojectionRate: 60 648 | ps4PronunciationXMLPath: 649 | ps4PronunciationSIGPath: 650 | ps4BackgroundImagePath: 651 | ps4StartupImagePath: 652 | ps4StartupImagesFolder: 653 | ps4IconImagesFolder: 654 | ps4SaveDataImagePath: 655 | ps4SdkOverride: 656 | ps4BGMPath: 657 | ps4ShareFilePath: 658 | ps4ShareOverlayImagePath: 659 | ps4PrivacyGuardImagePath: 660 | ps4ExtraSceSysFile: 661 | ps4NPtitleDatPath: 662 | ps4RemotePlayKeyAssignment: -1 663 | ps4RemotePlayKeyMappingDir: 664 | ps4PlayTogetherPlayerCount: 0 665 | ps4EnterButtonAssignment: 2 666 | ps4ApplicationParam1: 0 667 | ps4ApplicationParam2: 0 668 | ps4ApplicationParam3: 0 669 | ps4ApplicationParam4: 0 670 | ps4DownloadDataSize: 0 671 | ps4GarlicHeapSize: 2048 672 | ps4ProGarlicHeapSize: 2560 673 | playerPrefsMaxSize: 32768 674 | ps4Passcode: frAQBc8Wsa1xVPfvJcrgRYwTiizs2trQ 675 | ps4pnSessions: 1 676 | ps4pnPresence: 1 677 | ps4pnFriends: 1 678 | ps4pnGameCustomData: 1 679 | playerPrefsSupport: 0 680 | enableApplicationExit: 0 681 | resetTempFolder: 1 682 | restrictedAudioUsageRights: 0 683 | ps4UseResolutionFallback: 0 684 | ps4ReprojectionSupport: 0 685 | ps4UseAudio3dBackend: 0 686 | ps4UseLowGarlicFragmentationMode: 1 687 | ps4SocialScreenEnabled: 0 688 | ps4ScriptOptimizationLevel: 2 689 | ps4Audio3dVirtualSpeakerCount: 14 690 | ps4attribCpuUsage: 0 691 | ps4PatchPkgPath: 692 | ps4PatchLatestPkgPath: 693 | ps4PatchChangeinfoPath: 694 | ps4PatchDayOne: 0 695 | ps4attribUserManagement: 0 696 | ps4attribMoveSupport: 0 697 | ps4attrib3DSupport: 0 698 | ps4attribShareSupport: 0 699 | ps4attribExclusiveVR: 0 700 | ps4disableAutoHideSplash: 0 701 | ps4videoRecordingFeaturesUsed: 0 702 | ps4contentSearchFeaturesUsed: 0 703 | ps4CompatibilityPS5: 0 704 | ps4AllowPS5Detection: 0 705 | ps4GPU800MHz: 1 706 | ps4attribEyeToEyeDistanceSettingVR: 0 707 | ps4IncludedModules: [] 708 | ps4attribVROutputEnabled: 0 709 | monoEnv: 710 | splashScreenBackgroundSourceLandscape: {fileID: 0} 711 | splashScreenBackgroundSourcePortrait: {fileID: 0} 712 | blurSplashScreenBackground: 1 713 | spritePackerPolicy: 714 | webGLMemorySize: 32 715 | webGLExceptionSupport: 1 716 | webGLNameFilesAsHashes: 0 717 | webGLDataCaching: 1 718 | webGLDebugSymbols: 0 719 | webGLEmscriptenArgs: 720 | webGLModulesDirectory: 721 | webGLTemplate: APPLICATION:Default 722 | webGLAnalyzeBuildSize: 0 723 | webGLUseEmbeddedResources: 0 724 | webGLCompressionFormat: 0 725 | webGLWasmArithmeticExceptions: 0 726 | webGLLinkerTarget: 1 727 | webGLThreadsSupport: 0 728 | webGLDecompressionFallback: 0 729 | scriptingDefineSymbols: {} 730 | additionalCompilerArguments: {} 731 | platformArchitecture: {} 732 | scriptingBackend: {} 733 | il2cppCompilerConfiguration: {} 734 | managedStrippingLevel: {} 735 | incrementalIl2cppBuild: {} 736 | suppressCommonWarnings: 1 737 | allowUnsafeCode: 0 738 | useDeterministicCompilation: 1 739 | enableRoslynAnalyzers: 1 740 | additionalIl2CppArgs: 741 | scriptingRuntimeVersion: 1 742 | gcIncremental: 1 743 | assemblyVersionValidation: 1 744 | gcWBarrierValidation: 0 745 | apiCompatibilityLevelPerPlatform: {} 746 | m_RenderingPath: 1 747 | m_MobileRenderingPath: 1 748 | metroPackageName: UniGPT 749 | metroPackageVersion: 750 | metroCertificatePath: 751 | metroCertificatePassword: 752 | metroCertificateSubject: 753 | metroCertificateIssuer: 754 | metroCertificateNotAfter: 0000000000000000 755 | metroApplicationDescription: UniGPT 756 | wsaImages: {} 757 | metroTileShortName: 758 | metroTileShowName: 0 759 | metroMediumTileShowName: 0 760 | metroLargeTileShowName: 0 761 | metroWideTileShowName: 0 762 | metroSupportStreamingInstall: 0 763 | metroLastRequiredScene: 0 764 | metroDefaultTileSize: 1 765 | metroTileForegroundText: 2 766 | metroTileBackgroundColor: {r: 0.13333334, g: 0.17254902, b: 0.21568628, a: 0} 767 | metroSplashScreenBackgroundColor: {r: 0.12941177, g: 0.17254902, b: 0.21568628, a: 1} 768 | metroSplashScreenUseBackgroundColor: 0 769 | platformCapabilities: {} 770 | metroTargetDeviceFamilies: {} 771 | metroFTAName: 772 | metroFTAFileTypes: [] 773 | metroProtocolName: 774 | vcxProjDefaultLanguage: 775 | XboxOneProductId: 776 | XboxOneUpdateKey: 777 | XboxOneSandboxId: 778 | XboxOneContentId: 779 | XboxOneTitleId: 780 | XboxOneSCId: 781 | XboxOneGameOsOverridePath: 782 | XboxOnePackagingOverridePath: 783 | XboxOneAppManifestOverridePath: 784 | XboxOneVersion: 1.0.0.0 785 | XboxOnePackageEncryption: 0 786 | XboxOnePackageUpdateGranularity: 2 787 | XboxOneDescription: 788 | XboxOneLanguage: 789 | - enus 790 | XboxOneCapability: [] 791 | XboxOneGameRating: {} 792 | XboxOneIsContentPackage: 0 793 | XboxOneEnhancedXboxCompatibilityMode: 0 794 | XboxOneEnableGPUVariability: 1 795 | XboxOneSockets: {} 796 | XboxOneSplashScreen: {fileID: 0} 797 | XboxOneAllowedProductIds: [] 798 | XboxOnePersistentLocalStorageSize: 0 799 | XboxOneXTitleMemory: 8 800 | XboxOneOverrideIdentityName: 801 | XboxOneOverrideIdentityPublisher: 802 | vrEditorSettings: {} 803 | cloudServicesEnabled: {} 804 | luminIcon: 805 | m_Name: 806 | m_ModelFolderPath: 807 | m_PortalFolderPath: 808 | luminCert: 809 | m_CertPath: 810 | m_SignPackage: 1 811 | luminIsChannelApp: 0 812 | luminVersion: 813 | m_VersionCode: 1 814 | m_VersionName: 815 | apiCompatibilityLevel: 6 816 | activeInputHandler: 0 817 | cloudProjectId: 818 | framebufferDepthMemorylessMode: 0 819 | qualitySettingsNames: [] 820 | projectName: 821 | organizationId: 822 | cloudEnabled: 0 823 | legacyClampBlendShapeWeights: 0 824 | playerDataPath: 825 | forceSRGBBlit: 1 826 | virtualTexturingSupportEnabled: 0 827 | --------------------------------------------------------------------------------