Beamable SDK
Public Member Functions | Static Public Member Functions | Public Attributes | Protected Member Functions | Static Protected Member Functions | Static Protected Attributes | Properties | List of all members
Beamable.Editor.UI.BeamEditorWindow< TWindow > Class Template Referenceabstract

More...

Inheritance diagram for Beamable.Editor.UI.BeamEditorWindow< TWindow >:
Inheritance graph
[legend]
Collaboration diagram for Beamable.Editor.UI.BeamEditorWindow< TWindow >:
Collaboration graph
[legend]

Public Member Functions

virtual void OnEnable ()
 
virtual void OnDestroy ()
 
virtual void OnBeforeSerialize ()
 
virtual void OnAfterDeserialize ()
 This base implementation guarantees that the Instance field will always point to the deserialized version. Without this, the ordering of callbacks can cause two instances of a window to exist and both instances to be incorrectly initialized.
 
void BuildWithDefaultContext ()
 Implement this instead of OnEnable. The OnEnable implementation for BeamEditorWindow<T> contains the guard described in BeamEditor.DelayedInitializationCall. More...
 
void BuildWithContext (string code)
 Overload of BuildWithContext(BeamEditorContext) that uses the given code and BeamEditorContext.ForEditorUser(string) to find the BeamEditorContext instance to rebuild with.
 
void BuildWithContext (int index)
 Overload of BuildWithContext(BeamEditorContext) that uses the given index and BeamEditorContext.ForEditorUser(int) to find the BeamEditorContext instance to rebuild with.
 
void BuildWithContext (BeamEditorContext context=null)
 Rebuilds the window's entire content. If it cares about whether or not the given context is/isn't authenticated, it'll invoke either Build or BuildWhenNotAuthenticated. If the given context is null, it will rebuild with the current ActiveContext. More...
 

Static Public Member Functions

static async Task< TWindow > GetFullyInitializedWindow ()
 Creates, initializes then waits for the window instance to be completely ready for use before returning that instance. See FullyInitializedWindowPromise to understand why this is necessary.
 
static async Task< TWindow > GetFullyInitializedWindow (BeamEditorWindowInitConfig config)
 Creates, initializes then waits for the window instance to be completely ready for use before returning that instance. See FullyInitializedWindowPromise to understand why this is necessary.
 

Public Attributes

BeamEditorWindowInitConfig InitializedConfig
 The BeamEditorWindowInitConfig<TWindow> struct that was used to initialize this window.
 
Promise FullyInitializedWindowPromise
 A promise that gets completed when the window finishes running it's OnEnable method. Await this to guarantee the BeamEditorWindow<TWindow> instance is completely initialized. TODO: We shouldn't really need this. We have it now as a lot of the Model initialization happens during Window initialization. This model is then accessed, through the window instance, in certain parts TODO: of the code-base. This is a problem in certain Unity-event flows causing the model to not be initialized due to the window that manages it not being initialized when its accessed. TODO: In order to keep this current flow working and not have to refactor everything at once, we have this promise and GetFullyInitializedWindow(). TODO: This allows us to keep the current flow, but enables us to incrementally move away from this pattern of initializing System/Model instances inside the window initialization.
 
BeamEditorContext ActiveContext
 Reference to the current BeamEditorContext that is feeding this window with data.
 

Protected Member Functions

abstract void Build ()
 
virtual void BuildWhenNotAuthenticated ()
 

Static Protected Member Functions

static async Task InitBeamEditorWindow (BeamEditorWindowInitConfig config)
 Function that initializes a window based on it's given config . More...
 

Static Protected Attributes

static BeamEditorWindowInitConfig WindowDefaultConfig
 The default BeamEditorWindowInitConfig<TWindow> struct that is used when initializing this window via GetFullyInitializedWindow.
 
static BeamEditorInitializedDelayClause CustomDelayClause
 Static function to be set on any sub-type's initialization. It's used to add constraints to the generic-constrained version of this type's BeamEditor.DelayedInitializationCall.
 

Properties

static bool IsInstantiated [getprotected set]
 Whether or not the current window is instantiated. TODO: once we no longer support Unity 2018, change this into HasOpenInstance<TWindow>.
 

Detailed Description

Template Parameters
TWindow
Type Constraints
TWindow :BeamEditorWindow<TWindow> 
TWindow :new() 

Member Function Documentation

◆ BuildWithContext()

void Beamable.Editor.UI.BeamEditorWindow< TWindow >.BuildWithContext ( BeamEditorContext  context = null)
inline

Rebuilds the window's entire content. If it cares about whether or not the given context is/isn't authenticated, it'll invoke either Build or BuildWhenNotAuthenticated. If the given context is null, it will rebuild with the current ActiveContext.

Parameters
contextThe BeamEditorContext to rebuild this window with. When null, re-uses the existing context.

◆ BuildWithDefaultContext()

void Beamable.Editor.UI.BeamEditorWindow< TWindow >.BuildWithDefaultContext ( )

Implement this instead of OnEnable. The OnEnable implementation for BeamEditorWindow<T> contains the guard described in BeamEditor.DelayedInitializationCall.

The default implementation here guarantees this window has an ActiveContext to fill out it's data.

◆ InitBeamEditorWindow()

static async Task Beamable.Editor.UI.BeamEditorWindow< TWindow >.InitBeamEditorWindow ( BeamEditorWindowInitConfig  config)
inlinestaticprotected

Function that initializes a window based on it's given config .

Parameters
configA set of configuration parameters informing us how to initialize the window.

The documentation for this class was generated from the following file: