ArticyDatabase Class

Access to all your imported articy data.

Definition

Namespace: Articy.Unity
Assembly: ArticyRuntime (in ArticyRuntime.dll) Version: 1.3.1
C#
public class ArticyDatabase : ScriptableObject, 
	ISerializationCallbackReceiver
Inheritance
Object    Object    ScriptableObject    ArticyDatabase
Implements
ISerializationCallbackReceiver

Remarks

The database will be automatically be created when the plugin imports your articy draft data. Part of the plugin importer process is to automatically populate the database with your data. After the import is finished you can use the database and its static methods in the unity editor or at runtime to query, manage and filter your articy draft objects; manage your packages and get access to important parts for the flow execution, like the global variables.

  Note

You don't have to create this class. An instance of this class is generated and populated while importing, and stored as an asset in the "Generated/Resources" folder in your Assets folder. You can just directly access all its properties directly.

Example

C#
bool hasManfred = ArticyDatabase.IsObjectAvailable("Chr_Manfred");

Properties

ArticyDatabaseAssetFileName Gets the name of the articy database asset file. Without extension
ArticyDatabaseFolder Gets the articy database folder. Ends with a /
ArticyDatabasePath Gets the articy database asset path. The whole path with the extension.
DefaultGlobalVariables Gets the default variable storage used by all ArticyFlowPlayers when set to use the default one.
DefaultMethodProvider When setting this property the plugin will use this IBaseScriptMethodProvider always when calling articy scripts manually without passing the IBaseScriptMethodProvider parameter.
Instance Gets the instance of the articy database.
IsUnityPlaying Gets a value indicating whether unity is currently in play mode.
LoadedPackages Returns a list of all currently loaded packages.
LoadedPackagesCount Returns the number of currently loaded packages.
Localization Gets the localization manager, allowing simple localization support.
ObjectNotifications Gets the object notifications, which can be used to set listeners on properties of articy objects.
Objects Gets a readonly list of all Objects currently loaded in the database.
Packages Gets a readonly list of all available packages.
Project Gets the project information that were exported via articy draft.
ProjectHierarchy Gets the project hierarchy. A Manager containing all(even excluded or not exported) objects inside the used articy project in the form of lightweight information objects.
ScriptFragments Gets an internal used property to call script code from articy objects.

Methods

ClearDatabase This will completely resets the database and remove all changes.
CloneFrom(String, UInt32) Creates a new clone of the object with the given technical name. The clone will get the supplied instance id. The clone must not exist beforehand.
CloneFrom(UInt64, UInt32) Creates a new clone of the object with the given object id. The clone will get the supplied instance id. The clone must not exist beforehand.
CloneFromTObject(String, UInt32) Creates a new clone of the object with the given technical name. The clone will get the supplied instance id. The clone must not exist beforehand.
CloneOrGetFrom(String, UInt32) Try to get the object with the given technical name and instance id, or clone it if the instance id wasn't found.
CloneOrGetFrom(UInt64, UInt32) Try to get the object with the given object id and instance id, or clone it if the instance id wasn't found.
CloneOrGetFromTObject(String, UInt32) Try to get the object with the given technical name and instance id, or clone it if the instance id wasn't found.
CloneWithConsecutiveInstanceIdFrom(String, UInt32) Creates a new clone from the object with the given technical name, and assigns automatically a new free consecutive instance id
CloneWithConsecutiveInstanceIdFrom(UInt64, UInt32) Creates a new clone from the object with the given object id, and assigns automatically a new free consecutive instance id
CloneWithConsecutiveInstanceIdFromTObject(String, UInt32) Creates a new clone from the object with the given technical name, and assigns automatically a new free consecutive instance id
FilterObjects Returns a list of all objects that match the given search string.
FilterObjectsBasedOn Returns a list of all objects that match the given search string based on a pre filtered list.
GetAllOfTypeTObject Gets all articy objects of the specified type.
GetObject(String) Gets an object by its technical name. This is always the base object.
GetObject(String, UInt32) Gets an object by its technical name and instance id.
GetObject(UInt64, UInt32) Gets an object by its object id and an optional instance id.
GetObjectTObject(String) Gets an object by its technical name and returning it in the specified type.
GetObjectTObject(String, UInt32) Gets an object by its technical name and instance id and returning it in the specified type.
GetObjectTObject(UInt64, UInt32) Gets an object by its object id and an optional instance id.
GetObjects(String) Gets all objects with the given technical name. This will contain all objects: base and clones.
GetObjects(String, UInt32) Gets all objects with the given technical name and instance id.
InitializeAsync Must be called to initialize the plugin when "initialize asynchronously" is enabled in the plugin settings.
IsDatabaseAvailable Determines if the database is ready to be used.
IsObjectAvailable(String) Determines whether the object can be found in the database with the given technical name.
IsObjectAvailable(UInt64) Determines whether the object can be found in the database with the given object id.
IsObjectInLoadedPackages Determines whether the given object is in currently loaded packages.
LoadPackage(String) Loads the given package by name.
LoadPackage(UInt64) Loads the given package by id.
LoadPackageAsync(String) Loads the given package by name.
LoadPackageAsync(UInt64) Loads the given package by id.
RemoveAllClones(String) Removes all clones for an object with the given id.
RemoveAllClones(UInt64) Removes all clones for an object with the given id.
RemoveClone(String, UInt32) Removes the clone with a given instance id from the object with the given technical name.
RemoveClone(UInt64, UInt32) Removes the clone with a given instance id from the object with the given object id.
UnloadPackage(String, Boolean) Unloads a previously loaded package.
UnloadPackage(UInt64, Boolean) Unloads a previously loaded package.

See Also