Skip to main content

NetworkPrefabConverter

A class in Root.Township, Alta.Networking.

Type converter that turns a string (a prefab hash or name) into a NetworkPrefab, for console command arguments.

Constructors​

MemberWhat it is
NetworkPrefabConverter()Creates a NetworkPrefabConverter with default values.

Methods​

MemberWhat it is
override bool CanConvertFrom(ITypeDescriptorContext context, Type sourceType)True for strings.
override object ConvertFrom(ITypeDescriptorContext context, CultureInfo culture, object value)Looks up the prefab by hash or lower-case name; returns null if it can't be spawned by command. An unknown name probably throws.