Editor
WorldAssets
Finds world definitions and manifests in the project and maps scenes back to cells.
generated from the sources
Static class in namespace
Nebula.Editor · Packages/com.1by3.nebula/Editor/World/WorldAssets.cspublic static class WorldAssetsFinds world definitions and manifests in the project and maps scenes back to cells.
Methods
AllWorlds
public static WorldDefinition[] AllWorlds();Every WorldDefinition in the project (cached for a second; call Invalidate after creating one).
Invalidate
public static void Invalidate();AllManifests
public static WorldContainerManifest[] AllManifests();ManifestFor
public static WorldContainerManifest ManifestFor(WorldDefinition world);The manifest that targets world, or null.
TryGetCellOf
public static bool TryGetCellOf(Scene scene, out WorldDefinition world, out Vector3Int coord);
public static bool TryGetCellOf(string scenePath, out WorldDefinition world, out Vector3Int coord);Whether scene is a cell scene of some world, and which cell.
OpenSceneOf
public static Scene OpenSceneOf(WorldDefinition.CellEntry entry);IsOpen
public static bool IsOpen(WorldDefinition.CellEntry entry);CreateWorld
public static WorldDefinition CreateWorld(string assetPath, string worldName, Vector3 cellSize);Create a world definition asset at assetPath.
CreateManifest
public static WorldContainerManifest CreateManifest(string assetPath, WorldDefinition world);EnsureFolder
public static void EnsureFolder(string folder);Create every missing folder of an Assets/... path.
AddCellScenesToBuildSettings
public static int AddCellScenesToBuildSettings(WorldDefinition world);Make sure every cell scene of world is in the build settings (enabled). Returns how many were added.
RemoveFromBuildSettings
public static void RemoveFromBuildSettings(string scenePath);CellsSorted
public static IEnumerable<WorldDefinition.CellEntry> CellsSorted(WorldDefinition world);