Add canonical Aetheria Unity client
This commit is contained in:
parent
7c9e4cf37d
commit
27720f080b
34 changed files with 682 additions and 1 deletions
9
Aetheria.Unity/.gitignore
vendored
Normal file
9
Aetheria.Unity/.gitignore
vendored
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
/Library/
|
||||
/Logs/
|
||||
/Temp/
|
||||
/UserSettings/
|
||||
/Build/
|
||||
/*.csproj
|
||||
/*.sln
|
||||
/*.log
|
||||
/*.pid
|
||||
170
Aetheria.Unity/Assets/Aetheria.unity
Normal file
170
Aetheria.Unity/Assets/Aetheria.unity
Normal file
|
|
@ -0,0 +1,170 @@
|
|||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!29 &1
|
||||
OcclusionCullingSettings:
|
||||
m_ObjectHideFlags: 0
|
||||
serializedVersion: 2
|
||||
m_OcclusionBakeSettings:
|
||||
smallestOccluder: 5
|
||||
smallestHole: 0.25
|
||||
backfaceThreshold: 100
|
||||
m_SceneGUID: 00000000000000000000000000000000
|
||||
m_OcclusionCullingData: {fileID: 0}
|
||||
--- !u!104 &2
|
||||
RenderSettings:
|
||||
m_ObjectHideFlags: 0
|
||||
serializedVersion: 10
|
||||
m_Fog: 0
|
||||
m_FogColor: {r: 0.5, g: 0.5, b: 0.5, a: 1}
|
||||
m_FogMode: 3
|
||||
m_FogDensity: 0.01
|
||||
m_LinearFogStart: 0
|
||||
m_LinearFogEnd: 300
|
||||
m_AmbientSkyColor: {r: 0.212, g: 0.227, b: 0.259, a: 1}
|
||||
m_AmbientEquatorColor: {r: 0.114, g: 0.125, b: 0.133, a: 1}
|
||||
m_AmbientGroundColor: {r: 0.047, g: 0.043, b: 0.035, a: 1}
|
||||
m_AmbientIntensity: 1
|
||||
m_AmbientMode: 0
|
||||
m_SubtractiveShadowColor: {r: 0.42, g: 0.478, b: 0.627, a: 1}
|
||||
m_SkyboxMaterial: {fileID: 10304, guid: 0000000000000000f000000000000000, type: 0}
|
||||
m_HaloStrength: 0.5
|
||||
m_FlareStrength: 1
|
||||
m_FlareFadeSpeed: 3
|
||||
m_HaloTexture: {fileID: 0}
|
||||
m_SpotCookie: {fileID: 10001, guid: 0000000000000000e000000000000000, type: 0}
|
||||
m_DefaultReflectionMode: 0
|
||||
m_DefaultReflectionResolution: 128
|
||||
m_ReflectionBounces: 1
|
||||
m_ReflectionIntensity: 1
|
||||
m_CustomReflection: {fileID: 0}
|
||||
m_Sun: {fileID: 0}
|
||||
m_UseRadianceAmbientProbe: 0
|
||||
--- !u!157 &3
|
||||
LightmapSettings:
|
||||
m_ObjectHideFlags: 0
|
||||
serializedVersion: 13
|
||||
m_BakeOnSceneLoad: 0
|
||||
m_GISettings:
|
||||
serializedVersion: 2
|
||||
m_BounceScale: 1
|
||||
m_IndirectOutputScale: 1
|
||||
m_AlbedoBoost: 1
|
||||
m_EnvironmentLightingMode: 0
|
||||
m_EnableBakedLightmaps: 1
|
||||
m_EnableRealtimeLightmaps: 0
|
||||
m_LightmapEditorSettings:
|
||||
serializedVersion: 12
|
||||
m_Resolution: 2
|
||||
m_BakeResolution: 40
|
||||
m_AtlasSize: 1024
|
||||
m_AO: 0
|
||||
m_AOMaxDistance: 1
|
||||
m_CompAOExponent: 1
|
||||
m_CompAOExponentDirect: 0
|
||||
m_ExtractAmbientOcclusion: 0
|
||||
m_Padding: 2
|
||||
m_LightmapParameters: {fileID: 0}
|
||||
m_LightmapsBakeMode: 1
|
||||
m_TextureCompression: 1
|
||||
m_ReflectionCompression: 2
|
||||
m_MixedBakeMode: 2
|
||||
m_BakeBackend: 2
|
||||
m_PVRSampling: 1
|
||||
m_PVRDirectSampleCount: 32
|
||||
m_PVRSampleCount: 512
|
||||
m_PVRBounces: 2
|
||||
m_PVREnvironmentSampleCount: 256
|
||||
m_PVREnvironmentReferencePointCount: 2048
|
||||
m_PVRFilteringMode: 1
|
||||
m_PVRDenoiserTypeDirect: 1
|
||||
m_PVRDenoiserTypeIndirect: 1
|
||||
m_PVRDenoiserTypeAO: 1
|
||||
m_PVRFilterTypeDirect: 0
|
||||
m_PVRFilterTypeIndirect: 0
|
||||
m_PVRFilterTypeAO: 0
|
||||
m_PVREnvironmentMIS: 1
|
||||
m_PVRCulling: 1
|
||||
m_PVRFilteringGaussRadiusDirect: 1
|
||||
m_PVRFilteringGaussRadiusIndirect: 1
|
||||
m_PVRFilteringGaussRadiusAO: 1
|
||||
m_PVRFilteringAtrousPositionSigmaDirect: 0.5
|
||||
m_PVRFilteringAtrousPositionSigmaIndirect: 2
|
||||
m_PVRFilteringAtrousPositionSigmaAO: 1
|
||||
m_ExportTrainingData: 0
|
||||
m_TrainingDataDestination: TrainingData
|
||||
m_LightProbeSampleCountMultiplier: 4
|
||||
m_LightingDataAsset: {fileID: 20201, guid: 0000000000000000f000000000000000, type: 0}
|
||||
m_LightingSettings: {fileID: 0}
|
||||
--- !u!196 &4
|
||||
NavMeshSettings:
|
||||
serializedVersion: 2
|
||||
m_ObjectHideFlags: 0
|
||||
m_BuildSettings:
|
||||
serializedVersion: 3
|
||||
agentTypeID: 0
|
||||
agentRadius: 0.5
|
||||
agentHeight: 2
|
||||
agentSlope: 45
|
||||
agentClimb: 0.4
|
||||
ledgeDropHeight: 0
|
||||
maxJumpAcrossDistance: 0
|
||||
minRegionArea: 2
|
||||
manualCellSize: 0
|
||||
cellSize: 0.16666667
|
||||
manualTileSize: 0
|
||||
tileSize: 256
|
||||
buildHeightMesh: 0
|
||||
maxJobWorkers: 0
|
||||
preserveTilesOutsideBounds: 0
|
||||
debug:
|
||||
m_Flags: 0
|
||||
m_NavMeshData: {fileID: 0}
|
||||
--- !u!1 &2087846270
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 2087846272}
|
||||
- component: {fileID: 2087846271}
|
||||
m_Layer: 0
|
||||
m_Name: Aetheria Unity Client
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!114 &2087846271
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 2087846270}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 290906a425a95484b9ba8ed0ff616509, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier: Assembly-CSharp::AetheriaUnityClient
|
||||
--- !u!4 &2087846272
|
||||
Transform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 2087846270}
|
||||
serializedVersion: 2
|
||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||
m_LocalPosition: {x: 0, y: 0, z: 0}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children: []
|
||||
m_Father: {fileID: 0}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!1660057539 &9223372036854775807
|
||||
SceneRoots:
|
||||
m_ObjectHideFlags: 0
|
||||
m_Roots:
|
||||
- {fileID: 2087846272}
|
||||
7
Aetheria.Unity/Assets/Aetheria.unity.meta
Normal file
7
Aetheria.Unity/Assets/Aetheria.unity.meta
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 20c6bab2d08f20e4c822b3ee3f318fe7
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
63
Aetheria.Unity/Assets/AetheriaUnityClient.cs
Normal file
63
Aetheria.Unity/Assets/AetheriaUnityClient.cs
Normal file
|
|
@ -0,0 +1,63 @@
|
|||
using System;
|
||||
using System.Collections;
|
||||
using System.IO;
|
||||
using GameCult.Eve.UnityScene;
|
||||
using UnityEngine;
|
||||
|
||||
public sealed class AetheriaUnityClient : MonoBehaviour
|
||||
{
|
||||
private EveUnityCultMeshPlayableWorldProvider _provider;
|
||||
private EveUnityPlayableWorldClientBootstrap _bootstrap;
|
||||
private string _status = "Starting EveUnity...";
|
||||
|
||||
private void Awake()
|
||||
{
|
||||
Application.runInBackground = true;
|
||||
var endpoint = Environment.GetEnvironmentVariable("EVEUNITY_RENDEZVOUS_ENDPOINT") ?? "rudp://127.0.0.1:3076";
|
||||
var surfaceId = Environment.GetEnvironmentVariable("EVEUNITY_SURFACE_ID") ?? "aetheria.pilot";
|
||||
var replicaPath = Path.Combine(Application.persistentDataPath, "aetheria-unity.cc");
|
||||
|
||||
CreateView();
|
||||
_provider = gameObject.AddComponent<EveUnityCultMeshPlayableWorldProvider>();
|
||||
_provider.Configure(
|
||||
endpoint,
|
||||
replicaPath,
|
||||
surfaceId: surfaceId,
|
||||
requiredSurfaceKind: "interactive-world",
|
||||
clientRuntimeId: "aetheria-unity");
|
||||
_bootstrap = gameObject.AddComponent<EveUnityPlayableWorldClientBootstrap>();
|
||||
_bootstrap.ConfigureProvider(_provider);
|
||||
StartCoroutine(ConnectAfterFirstFrame());
|
||||
}
|
||||
|
||||
private IEnumerator ConnectAfterFirstFrame()
|
||||
{
|
||||
yield return null;
|
||||
_status = "Connecting to the advertised Eve surface...";
|
||||
yield return null;
|
||||
var presentation = _bootstrap.Mount();
|
||||
_status = $"Connected: {_provider.Selection.ProviderId} / {_provider.Selection.SurfaceId} / {presentation.ActiveEntities} entities";
|
||||
}
|
||||
|
||||
private static void CreateView()
|
||||
{
|
||||
var cameraObject = new GameObject("Main Camera") { tag = "MainCamera" };
|
||||
var camera = cameraObject.AddComponent<Camera>();
|
||||
camera.clearFlags = CameraClearFlags.SolidColor;
|
||||
camera.backgroundColor = new Color(0.025f, 0.035f, 0.055f);
|
||||
camera.nearClipPlane = 0.05f;
|
||||
camera.farClipPlane = 10000f;
|
||||
|
||||
var lightObject = new GameObject("World Light");
|
||||
var light = lightObject.AddComponent<Light>();
|
||||
light.type = LightType.Directional;
|
||||
light.intensity = 1.4f;
|
||||
lightObject.transform.rotation = Quaternion.Euler(50f, -35f, 0f);
|
||||
}
|
||||
|
||||
private void OnGUI()
|
||||
{
|
||||
GUI.Box(new Rect(12, 12, Math.Min(Screen.width - 24, 760), 54),
|
||||
_status + "\nWASD / left stick: move Mouse 1 / controller action: activate");
|
||||
}
|
||||
}
|
||||
2
Aetheria.Unity/Assets/AetheriaUnityClient.cs.meta
Normal file
2
Aetheria.Unity/Assets/AetheriaUnityClient.cs.meta
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 290906a425a95484b9ba8ed0ff616509
|
||||
8
Aetheria.Unity/Assets/Editor.meta
Normal file
8
Aetheria.Unity/Assets/Editor.meta
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
fileFormatVersion: 2
|
||||
guid: d98e9c1fc6eff72488457787aeb053bd
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
24
Aetheria.Unity/Assets/Editor/AetheriaUnityBuild.cs
Normal file
24
Aetheria.Unity/Assets/Editor/AetheriaUnityBuild.cs
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
using System.IO;
|
||||
using UnityEditor;
|
||||
using UnityEditor.SceneManagement;
|
||||
using UnityEngine;
|
||||
using UnityEngine.SceneManagement;
|
||||
|
||||
public static class AetheriaUnityBuild
|
||||
{
|
||||
public static void BuildWindows()
|
||||
{
|
||||
const string scenePath = "Assets/Aetheria.unity";
|
||||
var scene = EditorSceneManager.NewScene(NewSceneSetup.EmptyScene, NewSceneMode.Single);
|
||||
new GameObject("Aetheria Unity Client").AddComponent<AetheriaUnityClient>();
|
||||
EditorSceneManager.SaveScene(scene, scenePath);
|
||||
Directory.CreateDirectory("Build/Windows");
|
||||
var report = BuildPipeline.BuildPlayer(
|
||||
new[] { scenePath },
|
||||
"Build/Windows/Aetheria.exe",
|
||||
BuildTarget.StandaloneWindows64,
|
||||
BuildOptions.Development);
|
||||
if (report.summary.result != UnityEditor.Build.Reporting.BuildResult.Succeeded)
|
||||
throw new System.InvalidOperationException("Aetheria Unity build failed: " + report.summary.result);
|
||||
}
|
||||
}
|
||||
2
Aetheria.Unity/Assets/Editor/AetheriaUnityBuild.cs.meta
Normal file
2
Aetheria.Unity/Assets/Editor/AetheriaUnityBuild.cs.meta
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 4ce25f9c817826c4181dec2318d6f6d2
|
||||
13
Aetheria.Unity/Packages/manifest.json
Normal file
13
Aetheria.Unity/Packages/manifest.json
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
{
|
||||
"dependencies": {
|
||||
"com.unity.test-framework": "1.6.0",
|
||||
"com.unity.modules.assetbundle": "1.0.0",
|
||||
"com.unity.modules.imageconversion": "1.0.0",
|
||||
"com.unity.modules.physics": "1.0.0",
|
||||
"com.unity.modules.uielements": "1.0.0",
|
||||
"org.gamecult.cultlib": "https://github.com/GameCult/CultLib.git?path=/unity/org.gamecult.cultlib#cultlib-unity-source-v1.0.3-r2",
|
||||
"org.gamecult.eve.plugin-fields": "https://github.com/GameCult/EvePlugins.git?path=/plugins/eve-plugin-fields/unity/org.gamecult.eve.plugin-fields#eve-plugin-fields-unity-v0.1.1",
|
||||
"org.gamecult.eve.surface": "https://github.com/GameCult/EveUnity.git?path=/packages/org.gamecult.eve.surface#eveunity-surface-v0.1.0",
|
||||
"org.gamecult.eve.unity-scene": "https://github.com/GameCult/EveUnity.git?path=/packages/org.gamecult.eve.unity-scene#eveunity-scene-v0.1.4"
|
||||
}
|
||||
}
|
||||
108
Aetheria.Unity/Packages/packages-lock.json
Normal file
108
Aetheria.Unity/Packages/packages-lock.json
Normal file
|
|
@ -0,0 +1,108 @@
|
|||
{
|
||||
"dependencies": {
|
||||
"com.unity.ext.nunit": {
|
||||
"version": "2.0.5",
|
||||
"depth": 1,
|
||||
"source": "builtin",
|
||||
"dependencies": {}
|
||||
},
|
||||
"com.unity.test-framework": {
|
||||
"version": "1.6.0",
|
||||
"depth": 0,
|
||||
"source": "builtin",
|
||||
"dependencies": {
|
||||
"com.unity.ext.nunit": "2.0.3",
|
||||
"com.unity.modules.imgui": "1.0.0",
|
||||
"com.unity.modules.jsonserialize": "1.0.0"
|
||||
}
|
||||
},
|
||||
"org.gamecult.cultlib": {
|
||||
"version": "https://github.com/GameCult/CultLib.git?path=/unity/org.gamecult.cultlib#cultlib-unity-source-v1.0.3-r2",
|
||||
"depth": 0,
|
||||
"source": "git",
|
||||
"dependencies": {},
|
||||
"hash": "3a74e01d92f3e357205200edcba8f8a1c1b2dae1"
|
||||
},
|
||||
"org.gamecult.eve.plugin-fields": {
|
||||
"version": "https://github.com/GameCult/EvePlugins.git?path=/plugins/eve-plugin-fields/unity/org.gamecult.eve.plugin-fields#eve-plugin-fields-unity-v0.1.1",
|
||||
"depth": 0,
|
||||
"source": "git",
|
||||
"dependencies": {},
|
||||
"hash": "0b099274a4e2b4c301eced4322166837792f585a"
|
||||
},
|
||||
"org.gamecult.eve.surface": {
|
||||
"version": "https://github.com/GameCult/EveUnity.git?path=/packages/org.gamecult.eve.surface#eveunity-surface-v0.1.0",
|
||||
"depth": 0,
|
||||
"source": "git",
|
||||
"dependencies": {
|
||||
"org.gamecult.cultlib": "1.0.3"
|
||||
},
|
||||
"hash": "e10821f1cc81f619479c6507438f6a097d1f0ce2"
|
||||
},
|
||||
"org.gamecult.eve.unity-scene": {
|
||||
"version": "https://github.com/GameCult/EveUnity.git?path=/packages/org.gamecult.eve.unity-scene#eveunity-scene-v0.1.4",
|
||||
"depth": 0,
|
||||
"source": "git",
|
||||
"dependencies": {
|
||||
"org.gamecult.cultlib": "1.0.3",
|
||||
"org.gamecult.eve.plugin-fields": "0.1.1",
|
||||
"org.gamecult.eve.surface": "0.1.0"
|
||||
},
|
||||
"hash": "093eb80d6c2a6da216b9e6b3fb921494e427102c"
|
||||
},
|
||||
"com.unity.modules.assetbundle": {
|
||||
"version": "1.0.0",
|
||||
"depth": 0,
|
||||
"source": "builtin",
|
||||
"dependencies": {}
|
||||
},
|
||||
"com.unity.modules.hierarchycore": {
|
||||
"version": "1.0.0",
|
||||
"depth": 1,
|
||||
"source": "builtin",
|
||||
"dependencies": {}
|
||||
},
|
||||
"com.unity.modules.imageconversion": {
|
||||
"version": "1.0.0",
|
||||
"depth": 0,
|
||||
"source": "builtin",
|
||||
"dependencies": {}
|
||||
},
|
||||
"com.unity.modules.imgui": {
|
||||
"version": "1.0.0",
|
||||
"depth": 1,
|
||||
"source": "builtin",
|
||||
"dependencies": {}
|
||||
},
|
||||
"com.unity.modules.jsonserialize": {
|
||||
"version": "1.0.0",
|
||||
"depth": 1,
|
||||
"source": "builtin",
|
||||
"dependencies": {}
|
||||
},
|
||||
"com.unity.modules.physics": {
|
||||
"version": "1.0.0",
|
||||
"depth": 0,
|
||||
"source": "builtin",
|
||||
"dependencies": {}
|
||||
},
|
||||
"com.unity.modules.ui": {
|
||||
"version": "1.0.0",
|
||||
"depth": 1,
|
||||
"source": "builtin",
|
||||
"dependencies": {}
|
||||
},
|
||||
"com.unity.modules.uielements": {
|
||||
"version": "1.0.0",
|
||||
"depth": 0,
|
||||
"source": "builtin",
|
||||
"dependencies": {
|
||||
"com.unity.modules.ui": "1.0.0",
|
||||
"com.unity.modules.imgui": "1.0.0",
|
||||
"com.unity.modules.jsonserialize": "1.0.0",
|
||||
"com.unity.modules.hierarchycore": "1.0.0",
|
||||
"com.unity.modules.physics": "1.0.0"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
BIN
Aetheria.Unity/ProjectSettings/AudioManager.asset
(Stored with Git LFS)
Normal file
BIN
Aetheria.Unity/ProjectSettings/AudioManager.asset
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
Aetheria.Unity/ProjectSettings/ClusterInputManager.asset
(Stored with Git LFS)
Normal file
BIN
Aetheria.Unity/ProjectSettings/ClusterInputManager.asset
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
Aetheria.Unity/ProjectSettings/DynamicsManager.asset
(Stored with Git LFS)
Normal file
BIN
Aetheria.Unity/ProjectSettings/DynamicsManager.asset
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
Aetheria.Unity/ProjectSettings/EditorBuildSettings.asset
(Stored with Git LFS)
Normal file
BIN
Aetheria.Unity/ProjectSettings/EditorBuildSettings.asset
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
Aetheria.Unity/ProjectSettings/EditorSettings.asset
(Stored with Git LFS)
Normal file
BIN
Aetheria.Unity/ProjectSettings/EditorSettings.asset
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
Aetheria.Unity/ProjectSettings/GraphicsSettings.asset
(Stored with Git LFS)
Normal file
BIN
Aetheria.Unity/ProjectSettings/GraphicsSettings.asset
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
Aetheria.Unity/ProjectSettings/InputManager.asset
(Stored with Git LFS)
Normal file
BIN
Aetheria.Unity/ProjectSettings/InputManager.asset
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
Aetheria.Unity/ProjectSettings/MemorySettings.asset
(Stored with Git LFS)
Normal file
BIN
Aetheria.Unity/ProjectSettings/MemorySettings.asset
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
Aetheria.Unity/ProjectSettings/MultiplayerManager.asset
(Stored with Git LFS)
Normal file
BIN
Aetheria.Unity/ProjectSettings/MultiplayerManager.asset
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
Aetheria.Unity/ProjectSettings/NavMeshAreas.asset
(Stored with Git LFS)
Normal file
BIN
Aetheria.Unity/ProjectSettings/NavMeshAreas.asset
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
Aetheria.Unity/ProjectSettings/Physics2DSettings.asset
(Stored with Git LFS)
Normal file
BIN
Aetheria.Unity/ProjectSettings/Physics2DSettings.asset
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
Aetheria.Unity/ProjectSettings/PresetManager.asset
(Stored with Git LFS)
Normal file
BIN
Aetheria.Unity/ProjectSettings/PresetManager.asset
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
Aetheria.Unity/ProjectSettings/ProjectSettings.asset
(Stored with Git LFS)
Normal file
BIN
Aetheria.Unity/ProjectSettings/ProjectSettings.asset
(Stored with Git LFS)
Normal file
Binary file not shown.
2
Aetheria.Unity/ProjectSettings/ProjectVersion.txt
Normal file
2
Aetheria.Unity/ProjectSettings/ProjectVersion.txt
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
m_EditorVersion: 6000.4.2f1
|
||||
m_EditorVersionWithRevision: 6000.4.2f1 (7a4c1aeef971)
|
||||
BIN
Aetheria.Unity/ProjectSettings/QualitySettings.asset
(Stored with Git LFS)
Normal file
BIN
Aetheria.Unity/ProjectSettings/QualitySettings.asset
(Stored with Git LFS)
Normal file
Binary file not shown.
121
Aetheria.Unity/ProjectSettings/SceneTemplateSettings.json
Normal file
121
Aetheria.Unity/ProjectSettings/SceneTemplateSettings.json
Normal file
|
|
@ -0,0 +1,121 @@
|
|||
{
|
||||
"templatePinStates": [],
|
||||
"dependencyTypeInfos": [
|
||||
{
|
||||
"userAdded": false,
|
||||
"type": "UnityEngine.AnimationClip",
|
||||
"defaultInstantiationMode": 0
|
||||
},
|
||||
{
|
||||
"userAdded": false,
|
||||
"type": "UnityEditor.Animations.AnimatorController",
|
||||
"defaultInstantiationMode": 0
|
||||
},
|
||||
{
|
||||
"userAdded": false,
|
||||
"type": "UnityEngine.AnimatorOverrideController",
|
||||
"defaultInstantiationMode": 0
|
||||
},
|
||||
{
|
||||
"userAdded": false,
|
||||
"type": "UnityEditor.Audio.AudioMixerController",
|
||||
"defaultInstantiationMode": 0
|
||||
},
|
||||
{
|
||||
"userAdded": false,
|
||||
"type": "UnityEngine.ComputeShader",
|
||||
"defaultInstantiationMode": 1
|
||||
},
|
||||
{
|
||||
"userAdded": false,
|
||||
"type": "UnityEngine.Cubemap",
|
||||
"defaultInstantiationMode": 0
|
||||
},
|
||||
{
|
||||
"userAdded": false,
|
||||
"type": "UnityEngine.GameObject",
|
||||
"defaultInstantiationMode": 0
|
||||
},
|
||||
{
|
||||
"userAdded": false,
|
||||
"type": "UnityEditor.LightingDataAsset",
|
||||
"defaultInstantiationMode": 0
|
||||
},
|
||||
{
|
||||
"userAdded": false,
|
||||
"type": "UnityEngine.LightingSettings",
|
||||
"defaultInstantiationMode": 0
|
||||
},
|
||||
{
|
||||
"userAdded": false,
|
||||
"type": "UnityEngine.Material",
|
||||
"defaultInstantiationMode": 0
|
||||
},
|
||||
{
|
||||
"userAdded": false,
|
||||
"type": "UnityEditor.MonoScript",
|
||||
"defaultInstantiationMode": 1
|
||||
},
|
||||
{
|
||||
"userAdded": false,
|
||||
"type": "UnityEngine.PhysicsMaterial",
|
||||
"defaultInstantiationMode": 0
|
||||
},
|
||||
{
|
||||
"userAdded": false,
|
||||
"type": "UnityEngine.PhysicsMaterial2D",
|
||||
"defaultInstantiationMode": 0
|
||||
},
|
||||
{
|
||||
"userAdded": false,
|
||||
"type": "UnityEngine.Rendering.PostProcessing.PostProcessProfile",
|
||||
"defaultInstantiationMode": 0
|
||||
},
|
||||
{
|
||||
"userAdded": false,
|
||||
"type": "UnityEngine.Rendering.PostProcessing.PostProcessResources",
|
||||
"defaultInstantiationMode": 0
|
||||
},
|
||||
{
|
||||
"userAdded": false,
|
||||
"type": "UnityEngine.Rendering.VolumeProfile",
|
||||
"defaultInstantiationMode": 0
|
||||
},
|
||||
{
|
||||
"userAdded": false,
|
||||
"type": "UnityEditor.SceneAsset",
|
||||
"defaultInstantiationMode": 1
|
||||
},
|
||||
{
|
||||
"userAdded": false,
|
||||
"type": "UnityEngine.Shader",
|
||||
"defaultInstantiationMode": 1
|
||||
},
|
||||
{
|
||||
"userAdded": false,
|
||||
"type": "UnityEngine.ShaderVariantCollection",
|
||||
"defaultInstantiationMode": 1
|
||||
},
|
||||
{
|
||||
"userAdded": false,
|
||||
"type": "UnityEngine.Texture",
|
||||
"defaultInstantiationMode": 0
|
||||
},
|
||||
{
|
||||
"userAdded": false,
|
||||
"type": "UnityEngine.Texture2D",
|
||||
"defaultInstantiationMode": 0
|
||||
},
|
||||
{
|
||||
"userAdded": false,
|
||||
"type": "UnityEngine.Timeline.TimelineAsset",
|
||||
"defaultInstantiationMode": 0
|
||||
}
|
||||
],
|
||||
"defaultDependencyTypeInfo": {
|
||||
"userAdded": false,
|
||||
"type": "<default_scene_template_dependencies>",
|
||||
"defaultInstantiationMode": 1
|
||||
},
|
||||
"newSceneOverride": 0
|
||||
}
|
||||
BIN
Aetheria.Unity/ProjectSettings/TagManager.asset
(Stored with Git LFS)
Normal file
BIN
Aetheria.Unity/ProjectSettings/TagManager.asset
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
Aetheria.Unity/ProjectSettings/TimeManager.asset
(Stored with Git LFS)
Normal file
BIN
Aetheria.Unity/ProjectSettings/TimeManager.asset
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
Aetheria.Unity/ProjectSettings/UnityConnectSettings.asset
(Stored with Git LFS)
Normal file
BIN
Aetheria.Unity/ProjectSettings/UnityConnectSettings.asset
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
Aetheria.Unity/ProjectSettings/VFXManager.asset
(Stored with Git LFS)
Normal file
BIN
Aetheria.Unity/ProjectSettings/VFXManager.asset
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
Aetheria.Unity/ProjectSettings/VersionControlSettings.asset
(Stored with Git LFS)
Normal file
BIN
Aetheria.Unity/ProjectSettings/VersionControlSettings.asset
(Stored with Git LFS)
Normal file
Binary file not shown.
20
Aetheria.Unity/README.md
Normal file
20
Aetheria.Unity/README.md
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
# Aetheria Unity Client
|
||||
|
||||
This is Aetheria's Unity client and the canonical configuration example for
|
||||
lowering its advertised 3D pilot surface through EveUnity. The client contains no
|
||||
Aetheria runtime code. Aetheria owns the daemon surface and native asset bundle;
|
||||
EveUnity owns discovery, transport, lowering, input, camera, and presentation.
|
||||
|
||||
From the Aetheria repository root:
|
||||
|
||||
```powershell
|
||||
powershell -ExecutionPolicy Bypass -File .\scripts\run-aetheria-unity.ps1
|
||||
```
|
||||
|
||||
The launcher builds the provider's Unity AssetBundle, starts the Aetheria daemon,
|
||||
builds this project, and opens the standalone client. Close the client window to
|
||||
stop the daemon.
|
||||
|
||||
Configuration is supplied through `EVEUNITY_RENDEZVOUS_ENDPOINT` and
|
||||
`EVEUNITY_SURFACE_ID`. The defaults are `rudp://127.0.0.1:3076` and
|
||||
`aetheria.pilot`.
|
||||
|
|
@ -21,7 +21,9 @@ public sealed class AetheriaRenderSplatLayerRenderer : MonoBehaviour
|
|||
public bool TryGetTexture(string layerKey, out RenderTexture texture)
|
||||
{
|
||||
ResolveRenderer();
|
||||
return renderer != null && renderer.TryGetTexture(layerKey, out texture);
|
||||
if (renderer != null) return renderer.TryGetTexture(layerKey, out texture);
|
||||
texture = null;
|
||||
return false;
|
||||
}
|
||||
|
||||
public void Render(AetheriaRuntimeRenderSplatsViewportDocument document, int width, int height)
|
||||
|
|
|
|||
73
scripts/run-aetheria-unity.ps1
Normal file
73
scripts/run-aetheria-unity.ps1
Normal file
|
|
@ -0,0 +1,73 @@
|
|||
param(
|
||||
[string] $UnityExe = "C:\Program Files\Unity\Hub\Editor\6000.4.2f1\Editor\Unity.exe",
|
||||
[int] $Port = 3076,
|
||||
[switch] $SkipBuild
|
||||
)
|
||||
|
||||
$ErrorActionPreference = "Stop"
|
||||
$root = Split-Path -Parent $PSScriptRoot
|
||||
$project = Join-Path $root "Aetheria.Unity"
|
||||
$artifacts = Join-Path $project "Build\Logs"
|
||||
$clientExe = Join-Path $project "Build\Windows\Aetheria.exe"
|
||||
$daemonProject = Join-Path $root "Aetheria.State.Daemon\Aetheria.State.Daemon.csproj"
|
||||
$state = Join-Path $project "Build\aetheria-unity.cc"
|
||||
New-Item -ItemType Directory -Force $artifacts | Out-Null
|
||||
|
||||
if (-not $SkipBuild) {
|
||||
$assetLog = Join-Path $artifacts "asset-bundles.log"
|
||||
$assets = Start-Process $UnityExe -ArgumentList @(
|
||||
"-batchmode", "-quit", "-projectPath", $root,
|
||||
"-executeMethod", "Aetheria.Editor.EveAssetBundleBuilder.BuildWindows",
|
||||
"-logFile", $assetLog
|
||||
) -PassThru -WindowStyle Hidden
|
||||
Write-Host "Asset build PID: $($assets.Id)"
|
||||
Write-Host "Asset build log: $assetLog"
|
||||
if (-not $assets.WaitForExit(240000)) { Stop-Process $assets.Id -Force; throw "Asset build timed out." }
|
||||
if ($assets.ExitCode -ne 0) { Get-Content $assetLog -Tail 120; throw "Asset build failed." }
|
||||
|
||||
$clientLog = Join-Path $artifacts "client-build.log"
|
||||
$build = Start-Process $UnityExe -ArgumentList @(
|
||||
"-batchmode", "-quit", "-projectPath", $project,
|
||||
"-executeMethod", "AetheriaUnityBuild.BuildWindows",
|
||||
"-logFile", $clientLog
|
||||
) -PassThru -WindowStyle Hidden
|
||||
Write-Host "Client build PID: $($build.Id)"
|
||||
Write-Host "Client build log: $clientLog"
|
||||
if (-not $build.WaitForExit(300000)) { Stop-Process $build.Id -Force; throw "Client build timed out." }
|
||||
if ($build.ExitCode -ne 0 -or -not (Test-Path $clientExe)) { Get-Content $clientLog -Tail 120; throw "Client build failed." }
|
||||
}
|
||||
|
||||
if (-not (Test-Path $clientExe)) { throw "Client executable not found. Run without -SkipBuild first." }
|
||||
$daemonLog = Join-Path $artifacts "daemon.log"
|
||||
$daemon = Start-Process dotnet -ArgumentList @(
|
||||
"run", "--project", $daemonProject, "--",
|
||||
"--root", $root,
|
||||
"--state", $state,
|
||||
"--client-cultmesh-host", "127.0.0.1",
|
||||
"--client-cultmesh-advertise-host", "127.0.0.1",
|
||||
"--client-cultmesh-port", $Port,
|
||||
"--tick-interval-ms", 250,
|
||||
"--fixed-delta-ms", 20,
|
||||
"--no-odin-announcements"
|
||||
) -PassThru -WindowStyle Hidden -RedirectStandardOutput $daemonLog -RedirectStandardError "$daemonLog.error"
|
||||
Write-Host "Daemon PID: $($daemon.Id)"
|
||||
Write-Host "Daemon log: $daemonLog"
|
||||
|
||||
try {
|
||||
$ready = $false
|
||||
for ($i = 0; $i -lt 60; $i++) {
|
||||
if ($daemon.HasExited) { throw "Aetheria daemon exited. See $daemonLog" }
|
||||
if ((Test-Path $daemonLog) -and (Select-String $daemonLog -Pattern "Aetheria client CultMesh endpoint: rudp://127.0.0.1:$Port" -Quiet)) { $ready = $true; break }
|
||||
Start-Sleep -Milliseconds 500
|
||||
}
|
||||
if (-not $ready) { throw "Aetheria daemon did not publish its Eve endpoint." }
|
||||
$env:EVEUNITY_RENDEZVOUS_ENDPOINT = "rudp://127.0.0.1:$Port"
|
||||
$env:EVEUNITY_SURFACE_ID = "aetheria.pilot"
|
||||
$client = Start-Process $clientExe -ArgumentList "-force-d3d11" -PassThru
|
||||
Write-Host "Client PID: $($client.Id)"
|
||||
Write-Host "Close the client window to stop the daemon."
|
||||
$client.WaitForExit()
|
||||
}
|
||||
finally {
|
||||
if (-not $daemon.HasExited) { Stop-Process $daemon.Id -Force }
|
||||
}
|
||||
Loading…
Reference in a new issue