Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

754
Views
el script no hereda una clase nativa que pueda administrar una unidad de script

Soy un programador principiante en C# y Unity. Así que estaba creando un sistema de cuadrícula para mi juego y cuando intento agregar como componente cada secuencia de comandos en mi proyecto de Unity, muestra este error: "La secuencia de comandos no hereda una clase nativa que pueda administrar una secuencia de comandos". no se que debo hacer ayudenme por favor si pueden

//////////primer guión///////////////

 using System.Collections; using System.Collections.Generic; using UnityEngine; public class Gird1 : MonoBehaviour { private int width; private int height; private int[,] gridArray; public Gird(int width, int height) { this.width = width; this.height = height; gridArray = new int[width, height]; Debug.Log(width + " " + height); } }

////////segundo guion////////////////////

 using System.Collections; using System.Collections.Generic; using UnityEngine; public class Testing : MonoBehaviour { private void Start() { Grid grid = new Grid(20, 10); } void Update() { } }

imagen de rejilla

over 4 years ago · Santiago Trujillo
1 answers
Answer question

0

Su primer script se llama "Gird" no "Grid".

Segundo guión:

 public class Testing : MonoBehaviour { public Gird1 gird1; // Assign in the inspector. We need an instance of Gird1 private void Start() { if (gird1 == null) { // In case someone forgot to assign in the inspector gird1 = (Gird1)FindObjectOfType(typeof(Gird1)); // .. We'll search the scene } gird1.Gird(20,10); // Call the Gird() function on your gird1 instance } }
over 4 years ago · Santiago Trujillo Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!