Astra Unity 2.6.6
Astra Unity Plugin
|
This guide will walk you through the organization of the Astra SDK project structure for the Unity environment. This will give you an overview of where to find files such as DLLs, shaders, and namespaces.
Astra will install into Assets/Astra
it does not use any other folders in your project. It will create a database and log file (optional) based on your project's configuration. By default these will be created at temporary folders on your system so we encourage you to set them yourself Log Path
and Db Path
. You can create a configuration via the context menu Create/Astra/Config
by right clicking your project folder.
Inside the Astra folder you will see:
Managed
Native
Resources
Vendors
Examples
Your managed library is named Astra.Unity.dll
and is located at Assets/Astra/Managed
Your native (or unmanaged) libraries are located at Assets/Astra/Native/Plugins
these will contain platform specific libraries, for example on windows you will find Assets/Astra/Native/Plugins/Win64/Astra.dll
. If you have trouble building to a platform ensure the platform you're targeting is setup correctly for the environment.
Here you can see the macOS binary is enabled for both editor and standalone support for the macOS x64 environment
Currently Astra on Unity is supported on Windows, macOS, Linux, Android, and iOS.
Shaders for Astra are located at Assets/Astra/Resources/Shaders
. There are many shaders used by the Astra system, in addition there are often tuples of shaders for the legacy, URP, and HDRP render paths in Unity. Because Astra has advanced features required for shaders it you must be careful if you plan to modify these. There will be support in future versions to replace or inject your own shaders along with documentation on the standard for creating them.
In addition to the Astra library itself we also have libraries for first and third party vendors at Assets/Astra/Vendors
. These include:
Datastructures.KDTree.dll
- A KDTree implementation libraryGoogle.Protobuf.dll
- A library for message serialization used by AstraAstra.Logger.dll
- Our own library for managing the C# log entriesYou can safely ignore the vendors folder unless you run into conflicts from your own project.
Various examples for using Astra can be found in the Assets/Astra/Examples
folder. You are encouraged to check them out. There is a shared common config file which you will want to modify with your own configuration settings, it is located at: Assets/Astra/Examples/Common/Config/Astra.Config.json
.
The Astra library always has the Astra
namespace as a prefix, in addition there are several namespaces below the root used to help organize the library.
Astra
- Our root namespace, this contains many classes such as the job system, queue management, GUIDs, etcAstra.Asset
- Used primarily for asset management such as search and components such as AvatarItemAstra.Core
- Used mostly internally but misc other tools you will find inside here such as Decimation, in most cases you can ignore this.Astra.Eviction
- Used internally to handle removal of assets when other assets are applied, safe to ignoreAstra.FileFormats
- Used to handle I/O operations such as installing MR files or exporting (eg: OBJ)Astra.Legacy
- These are items scheduled for removal and in the process of being migrated, safe to ignoreAstra.Messages
- These are used for serialization and are sometimes used for lower level tooling, in most cases you will not directly use theseAstra.Net
- If you are querying network operations such as billing, products, etc you will use thisAstra.Physics
- This will be used in upcoming features to Astra for physicsAstra.Serialization
- Used for internal data structures such as serializable dictionaries, you're welcome to use these if they're of use to youAstra.Tools
- Typically used for diagnosticsAstra.Utils
- There are many useful utility functions in here but they will be rarely used by you except possibly the FeatureDetection
classMcsSDK20
- Used in serialization of messages, this will eventually port over to Astra.Messages for consistencyMost of your work will happen in the Astra
and Astra.Asset
namespaces.
For a list of all namespaces and classes within please view the Namespaces documentation.
Your assets do not exist as typical unity assets, instead they are automatically streamed down over the network into your database. Once local to your computer they are loaded into Unity procedurally through the Astra library. All assets (textures, meshes, rigs, morphables, etc) will be fully contained inside the database file (controlled by your project configuration).
To manage the list of assets that are available you will need to log into your admin portal provided at sign-up.