Class BakeUtil
public static class BakeUtil
- Inheritance
-
BakeUtil
Fields
MaxUniqueComponentsBound
Maximum number of different components that can be created for a particular network entity. In Unity, the number of different components that will be created for a network entity is given by: (Number of different Unity Components with bindings) + (Asset Id Component) + (Unique Id Component) + (Persistent Component) + (PreserveChildren Component) The sum of all these different Components cannot surpass 31.
public const int MaxUniqueComponentsBound = 31
Field Value
bakeOnBuildKey
public const string bakeOnBuildKey = "Coherence.BakeOnBuild"
Field Value
bakeOnEnterPlayModeKey
public const string bakeOnEnterPlayModeKey = "Coherence.BakeOnEnterPlayMode"
Field Value
coherenceSyncSchemasDirtyKey
public const string coherenceSyncSchemasDirtyKey = "Coherence.CoherenceSyncSchemasDirty"
Field Value
gatherOnBakeKey
public const string gatherOnBakeKey = "Coherence.GatherOnBake"
Field Value
Properties
ActiveSchemasChanged
Determines if the active schemas have changed since the last bake performed.
note
It only takes into account schemas, it won't consider the gather manifest (necessary for a complete bake).
public static bool ActiveSchemasChanged { get; }
Property Value
BakeOnBuild
public static bool BakeOnBuild { get; set; }
Property Value
BakeOnEnterPlayMode
public static bool BakeOnEnterPlayMode { get; set; }
Property Value
CoherenceSyncSchemaOutdated
Determines if the gathered CoherenceSync schema is outdated.
public static bool CoherenceSyncSchemaOutdated { get; }
Property Value
CoherenceSyncSchemasDirty
public static bool CoherenceSyncSchemasDirty { get; }
Property Value
GatherOnBake
public static bool GatherOnBake { get; set; }
Property Value
HasBaked
Determines if there's valid bake data.
public static bool HasBaked { get; }
Property Value
HasReflectedModeSupport
Determines if there is reflected mode support.
public static bool HasReflectedModeSupport { get; }
Property Value
HasSchemaID
public static bool HasSchemaID { get; }
Property Value
Outdated
Determines if the baked files are outdated, based on missing files and changes on schema files. If they are, a BakeAsync() operation is recommended.
public static bool Outdated { get; }
Property Value
OutputFolder
Gets the path (relative to the project path) where the baked files are stored.
public static string OutputFolder { get; }
Property Value
SchemaID
Gets the current SchemaID for this project. The SchemaID is a hash computed from the contents of all the active schemas.
public static string SchemaID { get; }
Property Value
SchemaIDShort
Gets the current short SchemaID (5 chars) for this project. The SchemaID is a hash computed from the contents of all the active schemas.
public static string SchemaIDShort { get; }
Property Value
Methods
Bake()
Bake coherence data synchronously.
- Save Schema file for your project
- Generate optimized code for your project
public static bool Bake()
Returns
- bool
True when the Schema file and the generated code was created successfully, false otherwise.
Remarks
The end of this method will force a recompilation.
BakeAsync()
Bake coherence data asynchronously.
- Save Schema file for your project
- Generate optimized code for your project
public static Task<bool> BakeAsync()
Returns
- Task<bool>
True when the Schema file and the generated code was created successfully, false otherwise.
Remarks
The end of this method will force a recompilation.
BakeAsyncNoReturn()
Bake coherence data asynchronously with no return.
- Save Schema file for your project
- Generate optimized code for your project
public static void BakeAsyncNoReturn()
Remarks
The end of this method will force a recompilation.
Events
OnBakeEnded
public static event Action OnBakeEnded
Event Type
OnBakeStarted
public static event Action OnBakeStarted
Event Type
OnSchemasSetDirty
public static event Action OnSchemasSetDirty