Catalog.InstantiateAsync<GameObject>("myPrefabGameObject", myGameObject => {
myGameObject.transform.position = whatever;
}, "SpawningMyGameObject");
{% endhighlight %}
/// <summary>
/// Returns true if the player is TK holding the item
/// </summary>
/// <param name="item"></param>
/// <returns></returns>
public static bool IsPlayerTkHolding( Item item ) {
if ( item != null ) {
foreach ( SpellCaster spellCaster in item.tkHandlers ) {
if ( spellCaster.ragdollHand.creature.isPlayer ) {
return true;
}
}
}
return false;
}
item.Set("cullingDetectionEnabled", false);
public static void Set<T>( this object source, string fieldName, T val ) {
source.GetType()
.GetField(fieldName, BindingFlags.NonPublic | BindingFlags.Instance)
.SetValue(source, val);
}
{
"$type": "ThunderRoad.LevelData, ThunderRoad",
"id": "Master",
"version": 3,
"modes": [
{
"name": "Default",
"modules": [
{
"$type": "Namespace.Classname, DLL-Name"
}
]
}
]
}