Beamable SDK
Classes | Enumerations
Beamable.Common.Assistant Namespace Reference

Classes

struct  BeamHint
 Helper struct to deal with an individual BeamHint. Contains it's BeamHintHeader (unique key identifying the BeamHint) and a read-only reference to the hint's object.
More...
 
class  BeamHintDomainAttribute
 Used to declare that certain "static readonly string" fields are BeamHintDomains — this information is cached by the BeamHintReflectionCache system. More...
 
class  BeamHintDomainProvider
 Abstract class that should be implemented in any class that will contain declarations of BeamHintDomainAttribute on their "readonly static string" fields. BeamHintDomains for a better understanding of this. More...
 
class  BeamHintDomains
 BeamHint domains are a large-scale contextual grouping for hints. We use these to organize and display them in a logical and easy to navigate way. Domains cannot have SUB_DOMAIN_SEPARATOR, BeamHintHeader.AS_KEY_SEPARATOR or BeamHintSharedConstants.BEAM_HINT_PREFERENCES_SEPARATOR as they are reserved characters More...
 
class  BeamHintGlobalStorage
 
struct  BeamHintHeader
 A compound-key identifying each hint. It is a string-based compound key whose individual fields cannot have AS_KEY_SEPARATOR or BeamHintSharedConstants.BEAM_HINT_PREFERENCES_SEPARATOR. These are reserved by our internal systems that manage hints. See BeamHintDomains and BeamHintIds for a better understanding of how to generate hint domains and ids. More...
 
class  BeamHintIdAttribute
 Used to declare that certain "static readonly string" fields are BeamHintIds — this information is cached by the BeamHintReflectionCache system. More...
 
class  BeamHintIdProvider
 Abstract class that should be implemented in any class that will contain declarations of BeamHintIdAttribute on their "readonly static string" fields. BeamHintIds for a better understanding of this. More...
 
class  BeamHintIds
 BeamHint ids are unique identifiers that translates to a single displayed hint and for which notifications are tracked. There are 3 primary ways of thinking about ids:

  • Identify several instances of the same problem and display all of them in a single consistent hint (see BeamHintDomains.BEAM_CSHARP_MICROSERVICES_CODE_MISUSE, or any other Code Misuse, as examples).
  • Identify a single hint/tip that may be interesting to communicate and create a hint Id for it.
  • Embed a content/player or some other unique identifier into the id to guarantee uniqueness and display relevant data. Be careful with this approach as it can easily flood the Assistant window making it less useful.
Ids cannot have "¬" or "₢" they are reserved characters (see BeamHintDomains.SUB_DOMAIN_SEPARATOR, BeamHintHeader.AS_KEY_SEPARATOR and BeamHintSharedConstants.BEAM_HINT_PREFERENCES_SEPARATOR). Use GenerateHintId to ensure the immutable part of the hint's id is valid when declaring it. Use AppendHintIdParams methods to ensure you are respecting the Id creation rules and you are embedding parameters into the id (for cases like the third item in the bullet point list). More...
 
class  BeamHintSharedConstants
 Constants that are used across all Beamable Packages by the BeamHint system.
 
class  BeamHintStorage
 Defines a storage for BeamHints. This implementation is header-based, meaning: More...
 
class  BeamHintSystemAttribute
 
interface  IBeamHintGlobalStorage
 Interface for the Global Storage — only exists to enable mocking for automated testing purposes so it'll acknowledge implementation details of the BeamHintGlobalStorage which is our implementation of this interface. Internally, we have one IBeamHintStorage for each User's hints and another one for Beamable's hints. As the number of generated hints a domain can produce grows, we split these macro-storages into one for each domain generated with BeamHintDomains.GenerateSubDomain and/or BeamHintDomains.GenerateBeamableDomain. This approach allows us to ensure we can move our internal data around to avoid slow-editor performance. More...
 
interface  IBeamHintPreferencesManager
 Manages and persists BeamHint preferences. Can decide to display/ignore hints, play mode warnings and/or notifications. It persists this configuration in a per-session or permanent level. More...
 
interface  IBeamHintStorage
 Defines a storage for BeamHints. It is a query-able in-memory database of BeamHints. Other IBeamHintSystem systems add hints to these and IBeamHintSystem read, filter, clear and arrange data logically in relation to BeamHintHeaders to be read by UI. More...
 
interface  IBeamHintSystem
 These are UnityEditor only systems. You should assume they'll only exist "#if UNITY_EDITOR" is true. You can use these to IBeamHintSystems read, filter, clear and arrange data logically in relation to BeamHintHeaders to be read by UI and other systems. Keep in mind:

  • These only work in editor — their instances won't ever be initialized outside of it.
  • Place System.Diagnostics.ConditionalAttribute("UNITY_EDITOR") on all functions you plan to call from non-editor code.
  • For use with non-editor only systems, write pure functions that take in ALL the necessary data from the non-editor systems and does the processing and addition of hints.
  • Use "void" functions whenever interacting with non-editor code as we'll strip these calls in non-editor environments.
  • If you need state to decide to show hints, aggregate and store this state in the IBeamHintSystem's member fields via calls to methods that are System.Diagnostics.ConditionalAttribute.
More...
 

Enumerations

enum  BeamHintType { Invalid = 0 , Validation = 1 << 0 , Hint = 1 << 1 , All = Validation | Hint }
 
enum  BeamHintVisibilityPreference { Display , HiddenDuringSession , Hidden }
 Current State of display tied to any specific BeamHintHeader.
 
enum  BeamHintPlayModeWarningPreference { Enabled , EnabledDuringSession , Disabled }
 Current State of the play mode warning tied to any specific BeamHintHeader.
 
enum  BeamHintNotificationPreference { NotifyOncePerSession , NotifyOnContextObjectChanged , NotifyNever }
 Current state of the Notification preference setting tied to any specific BeamHintHeaders.