Complete portable planetary presentation contracts

This commit is contained in:
Meta Vens 2026-07-13 02:52:13 +01:00
commit 102403efac
74 changed files with 1166 additions and 31 deletions

View file

@ -0,0 +1,18 @@
{
"name": "CultMath.PlanetaryViewer.Editor",
"rootNamespace": "CultMath.Unity.Samples.Editor",
"references": [
"CultMath.PlanetaryViewer"
],
"includePlatforms": [
"Editor"
],
"excludePlatforms": [],
"allowUnsafeCode": false,
"overrideReferences": false,
"precompiledReferences": [],
"autoReferenced": true,
"defineConstraints": [],
"versionDefines": [],
"noEngineReferences": false
}

View file

@ -0,0 +1,26 @@
using UnityEditor;
using UnityEngine;
namespace CultMath.Unity.Samples.Editor;
public static class CultMathPlanetaryViewerMenu
{
[MenuItem("GameObject/CultMath/Planetary Field Viewer", false, 10)]
public static void CreateViewer()
{
var root = new GameObject("CultMath Planetary Field Viewer");
Undo.RegisterCreatedObjectUndo(root, "Create CultMath Planetary Viewer");
root.AddComponent<CultMathPlanetaryViewer>();
Selection.activeGameObject = root;
if (Camera.main != null) return;
var cameraObject = new GameObject("Planetary Viewer Camera");
Undo.RegisterCreatedObjectUndo(cameraObject, "Create Planetary Viewer Camera");
cameraObject.tag = "MainCamera";
cameraObject.transform.position = new Vector3(0, 0, -24);
cameraObject.transform.LookAt(root.transform);
var camera = cameraObject.AddComponent<Camera>();
camera.nearClipPlane = 0.01f;
camera.farClipPlane = 1000;
}
}