Example #1
0
    public static Player CreatePlayer(string name)
    {
        var player = (Player)ScriptableObject.CreateInstance("Player");

        player.Name   = string.IsNullOrWhiteSpace(name) ? Instance.GetName() : name;
        player.Colour = Instance.GetColor();

        return(player);
    }