I’m still really new to c# I have a basic character selection screen going where you can click platforms to start the level with the character you choose but can’t seem to work out how to spawn the player, I’ve looked everywhere and stuck it all together trying to get it to work but it all works off of cloning objects that already exist and not spawning them
using UnityEngine;
namespace ChangeLevel
{
public class CharHuman : MonoBehaviour
{
public float
Player = Resources.Load("Players/Human1");
{
void OnMouseDown () {
Application.LoadLevel ("999 Game");
Instantiate(Player, Vector3(-6,48,4), Quaternion(0,270,0));
}
}
}
The code is a bit of a mess but I’ve been spending ages trying to get the Resources.Load to work as I can’t seem to work out how to use it, everyone seems to be using it just to apply textures but I need to load the player