Table of Contents

Class BakeUtil

Namespace
Coherence.Editor
Assembly
Coherence.Editor.dll
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

int

bakeOnBuildKey

public const string bakeOnBuildKey = "Coherence.BakeOnBuild"

Field Value

string

bakeOnEnterPlayModeKey

public const string bakeOnEnterPlayModeKey = "Coherence.BakeOnEnterPlayMode"

Field Value

string

coherenceSyncSchemasDirtyKey

public const string coherenceSyncSchemasDirtyKey = "Coherence.CoherenceSyncSchemasDirty"

Field Value

string

gatherOnBakeKey

public const string gatherOnBakeKey = "Coherence.GatherOnBake"

Field Value

string

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

bool

BakeOnBuild

public static bool BakeOnBuild { get; set; }

Property Value

bool

BakeOnEnterPlayMode

public static bool BakeOnEnterPlayMode { get; set; }

Property Value

bool

CoherenceSyncSchemaOutdated

Determines if the gathered CoherenceSync schema is outdated.

public static bool CoherenceSyncSchemaOutdated { get; }

Property Value

bool

CoherenceSyncSchemasDirty

public static bool CoherenceSyncSchemasDirty { get; }

Property Value

bool

GatherOnBake

public static bool GatherOnBake { get; set; }

Property Value

bool

HasBaked

Determines if there's valid bake data.

public static bool HasBaked { get; }

Property Value

bool

HasReflectedModeSupport

Determines if there is reflected mode support.

public static bool HasReflectedModeSupport { get; }

Property Value

bool

HasSchemaID

public static bool HasSchemaID { get; }

Property Value

bool

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

bool

OutputFolder

Gets the path (relative to the project path) where the baked files are stored.

public static string OutputFolder { get; }

Property Value

string

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

string

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

string

Methods

Bake()

Bake coherence data synchronously.

  1. Save Schema file for your project
  2. 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.

  1. Save Schema file for your project
  2. 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.

  1. Save Schema file for your project
  2. 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

Action

OnBakeStarted

public static event Action OnBakeStarted

Event Type

Action

OnSchemasSetDirty

public static event Action OnSchemasSetDirty

Event Type

Action