Vehicle Name - NeisesMike/VehicleFramework GitHub Wiki

Your vehicle has two meaningful names: its Vehicle Name and its Prefab Name.

To clarify, every Seamoth has the same Prefab Name, but a moon pool could be used to change each Seamoth's Vehicle Name.

Vehicle Name

This is the name of a specific vehicle. Each vehicle starts with a default name.

public class Crush : Drone
{
    ...
    public override string vehicleDefaultName => "Crush";
    ...
}

This is a field in ModVehicle (in Vehicle, actually) that dictates the HUD Ping Name as well as the name in the Beacons tab of your PDA. This name can be changed in a moonpool or via other methods. This is the name that will be changed when the player changes their vehicle's name to "Smasher" using some kind of typing console.

Prefab Name

This is the name of the type of vehicle. The player may have many "Seamoth-type" vehicles, but they might each have a different vehicle name. What they all have in common is their Prefab Name.

Drone crush = assets.model.EnsureComponent<Crush>() as Drone;
crush.name = "marty"; // here is where I reconfigure the Crush's GameObject name.
yield return UWE.CoroutineHost.StartCoroutine(VehicleRegistrar.RegisterVehicle(crush));
CrushArmTechType = RegisterCrushArmFragment(crush);

The Prefab Name will be shown in the Mobile Vehicle Bay, Blueprints tab, and the Database. It's also the name that you'll use to cheat your vehicle into the game by "spawn marty" in the console.

If you don't reconfigure the name like I showed, the Prefab Name is the name of your prefab. If you don't want to rename and re-export your asset bundle, configuring it like this can be a convenient choice.

⚠️ **GitHub.com Fallback** ⚠️