im new and im prepared to feel dumb but i did hours of this and i dont know. the prefab spawns, it has the animator component, but no controller in it. its in resources and resources folder is in assets.
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class Instantiationship : MonoBehaviour
{
// Reference to the Prefab. Drag a Prefab into this field in the Inspector.
public GameObject myPrefab;
// This script will simply instantiate the Prefab when the game starts.
void Start()
{
GameObject newGameObject = Instantiate(myPrefab, new Vector3(0, 0, 0), Quaternion.identity);
Animator animator = newGameObject.AddComponent<Animator>();
animator.runtimeAnimatorController = Resources.Load("/acship1") as RuntimeAnimatorController;
}
}