0
using System.Collections;
using System.Collections.Generic;
using System.Runtime.CompilerServices;
using UnityEditor;
using UnityEngine;

public class spawn_figure : MonoBehaviour
{
    [SerializeField] GameObject prefab;
    [SerializeField] Transform pos;
    void Awake()    
    {   
        Instantiate(prefab,pos);
    }
}

P.s. SerializeField поля настроил. В prefab закинул, собственно, префаб, в pos трансформ объекта, но при запуске кидает ошибку.

0 Answers0