Class KUID

From TrainzOnline
(Difference between revisions)
Jump to: navigation, search
m
Line 4: Line 4:
 
<br>
 
<br>
  
*A class providing access to an asset by reference to its KUID identification. This class works with data which is common to all ''instances'' of the asset and cannot be used to reference an individual object placed in the game.
+
*A class providing access to an asset by reference to its [[KUID]] identification. This class works with data which is common to all ''instances'' of the asset and cannot be used to reference an individual object placed in the game.
*A KUID contains data fields representing the creator of the asset, the asset's unique identification and a version identifier which is incremented with each published revision
+
*A [[KUID]] contains data fields representing the creator of the asset, the asset's unique identification and a version identifier which is incremented with each published revision.
*See [[TagName Kuid]] for further details.  
+
  
 
__FORCETOC__
 
__FORCETOC__

Revision as of 09:53, 4 March 2010


  • A class providing access to an asset by reference to its KUID identification. This class works with data which is common to all instances of the asset and cannot be used to reference an individual object placed in the game.
  • A KUID contains data fields representing the creator of the asset, the asset's unique identification and a version identifier which is incremented with each published revision.


Contents

GetHTMLString

public native string GetHTMLString(void)
Parameters
  • None
Returned Value
  • A string representing the KUID of the asset formatted for use as a parameter in browser HTML code.
Notes
  • There may be more than one version of a particular asset installed on the target system, this method will always return the latest available revision.


GetLogString

public native string GetLogString(void)
Parameters
  • None
Returned Value
  • A string representing the KUID of the asset formatted for use in error logs and the like.
Syntax
KUID kuid = FindAsset("coalman");
Interface.Print("Coalman's KUID is: " + kuid.GetLogString());
Notes
  • There may be more than one version of a particular asset installed on the target system, this method will always return the latest available revision.


GetName

public native string GetName(void)
Parameters
  • None
Returned Value
  • A string representing the name of the asset.
Syntax
KUID kuid = FindAsset("coalman");
Interface.Print("Coalman's username is: " + kuid.GetName());
Notes


Related Methods

Asset.GetKUID()
Asset.LookupKUIDTable()
Asset.FindAsset()
Soup.GetNamedTagAsKUID()
World.FindAsset()


Categories

Personal tools