Hi. Problem is when I try to add script to gameObject. Unity editor stop responding and I have to restart.
Script is simple like a problem . But create another project wit other name and problem against.
What to do?
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
[ExecuteInEditMode]
public class A1 : MonoBehaviour
{
[Range(1, 360)]
public int _A = 2;
public int _C;
public int T;
public int[] Points;
public int[] X_;
public int[] Y_;
public int[] Z_;
private int Index_;
private int e;
// Start is called before the first frame update
void Start()
{
}
// Update is called once per frame
void Update()
{
Debug.Log("Work's");
Index_ = 0;
T = _A * _A;
_C = T * 3;
Points = new int[_C];
X_ = new int[T];
Y_ = new int[T];
Z_ = new int[T];
Cal();
}
public void Cal()
{
int a = _A;
if (a == _A)
{
Debug.Log("Cal(); -- Initiation");
for (e = 1; e <= _A; e++)
{
Debug.Log("Cal(); -- First Loop");
Debug.Log("j = " + e);
if (_A > 1) { Index_++; }// = Index_ + 1; }
for (; Index_ <= e + 2;)
{
Debug.Log("Cal(); -- Secound Loop");
Debug.Log("Index_ = " + Index_);
}
}
}
}
}