Click or drag to resize

ArticyDatabaseGetObject Method (String)

Gets an object by its technical name. This is always the base object.

Namespace:  Articy.Unity
Assembly:  ArticyRuntime (in ArticyRuntime.dll) Version: 1.0.3
Syntax
C#
public static ArticyObject GetObject(
	string aTechnicalName
)

Parameters

aTechnicalName
Type: SystemString
The technical name of the object in question.

Return Value

Type: ArticyObject
The found object with the given aTechnicalName or null if the name doesn't exist in the database or the owning package is not loaded.
Remarks

This is the basic way of getting an articy object by its technical name. If the object is not found null will be returned.

Note Note
The technical name is case sensitive.
Tip Tip
If you are using packages you might get null as a result to this call, but are sure that the objects technical name is correct. In that case make sure the owning package is fully loaded.
Caution note Caution
Because articy:draft doesn't enforce technical name uniqueness, it is possible to have multiple objects with the same technical name. At the moment this isn't fully supported and this method will return the first object with the given technical name, the order is unspecified. If you can't assure unique technical names, it might be safer to use the overload.
Examples
C#
// get the object by its technical name
var manfred1 = ArticyDatabase.GetObject("Chr_Manfred");
See Also