BNBScene

Objective-C

@interface BNBScene : NSObject

/** Set a new name for a scene. The name could be empty. */
- (void)setName:(nonnull NSString *)name;

/** Get a scene name. */
- (nonnull NSString *)getName;

/** Get the root of entities hierarchy. It always exists and has a name "Root". */
- (nullable BNBEntity *)getRoot;

/** Get the AssetManager of a current scene. It always exists. */
- (nullable BNBAssetManager *)getAssetManager;

- (void)addLayer:(nullable BNBLayer *)layer;

- (nonnull NSArray<BNBLayer *> *)getLayers;

/** Get all components present in this scene of specified type */
- (nonnull NSArray<BNBComponent *> *)getComponents:(BNBComponentType)type;

/** Return first found layer with name `layerName` or NULL if such layer doesn't exist. */
- (nullable BNBLayer *)getLayer:(nonnull NSString *)layerName;

- (void)removeLayer:(nullable BNBLayer *)layer;

- (void)setRenderList:(nullable BNBRenderList *)renderList;

- (nullable BNBRenderList *)getRenderList;

- (void)clearRenderList;

- (nullable BNBCamera *)getCamera;

- (void)enableRecognizerFeature:(BNBFeatureId)feature;

- (void)disableRecognizerFeature:(BNBFeatureId)feature;

- (void)addFeatureParam:(BNBFeatureId)feature
                 params:(nonnull NSArray<BNBFeatureParameter *> *)params;

- (void)addEffectEvent:(nonnull NSString *)name
                params:(nonnull NSDictionary<NSString *, NSString *> *)params;

- (BNBTriggerStatusType)getTriggerStatus:(BNBTriggerType)trigger;

- (nullable BNBEntity *)createEntity:(nonnull NSString *)name;

- (int64_t)getNativeContext;

- (int32_t)getSurfaceWidth;

- (int32_t)getSurfaceHeight;

/**
 *find global material parameter by name
 *@param name (string)
 *@return parameter (parameter) or null
 */
- (nullable BNBParameter *)findGlobalMaterialParameter:(nonnull NSString *)name;

@end

Swift

class BNBScene : NSObject

Undocumented