[This is preliminary documentation and is subject to change.]
Gets an agent with the specified name. If an agent cannot be found,
this method returns null.
Namespace: ClarionAssembly: ClarionLibrary (in ClarionLibrary.dll) Version: 6.1.1.0 (6.1.1.0)
Syntax
C# |
---|
public static Agent GetAgent( IComparable name ) |
Parameters
- name
- Type: System..::..IComparable
The name of an agent to get
Return Value
An agent with the specified name or null if an agent cannot be found
Remarks
![]() |
---|
This method CANNOT guarantee correct retrieval unless ALL agents are initialized using a unique name. Since a name is optional for an agent and since multiple agents can have the same name, calling this method will only returns the FIRST instance of an agent with the specified name (if one is found). Keep this in mind if you plan to use this method to retrieve agents from the world. |
Exceptions
Exception | Condition |
---|---|
System..::..InvalidOperationException | If the singleton world instance has not been initialized |