zoukankan      html  css  js  c++  java
  • Unity3D脚本编写错误汇集

    You are trying to create a MonoBehaviour using the 'new' keyword.  This is not allowed. 

    1 using UnityEngine;
    2 
    3 namespace Assets
    4 {
    5     public abstract class AbstractRotaryMovement:MonoBehaviour
    6     {
    7         public abstract void Whirling(GameObject gameObject,float x,float y,float z);
    8     }
    9 }
     1 using System.Threading.Tasks;
     2 using UnityEngine;
     3 
     4 namespace Assets
     5 {
     6     public class ConcreteRotaryMovement3D: AbstractRotaryMovement
     7     {
     8         public override void Whirling(GameObject gameObject,float x,float y,float z)
     9         {
    10             gameObject.transform.eulerAngles = new Vector3(x, y, z);
    11         }
    12         public int Hh()
    13         {
    14             return 22;
    15         }
     1 using UnityEngine;
     2 using System.Configuration;
     3 using System.Reflection;
     4 using System;
     5 
     6 public class MoveControl : MonoBehaviour
     7 {
     8     public ConcreteRotaryMovement3D concreteRotaryMovement3D = new ConcreteRotaryMovement3D();
     9     public TextClass textClass;
    10     // Start is called before the first frame update
    11     void Start()
    12     {
    13 
    14     }

    继承自MonoBehaviour的类,不允许被实例化

  • 相关阅读:
    csdn已成垃圾站了,基本不能常上了
    pymssql under ubuntu
    csdn已成垃圾站了,基本不能常上了
    redis记录
    redis记录
    pythonictclas2009编译小捷
    tar打包
    跳过mysql直奔nosql推荐时代
    pymssql under ubuntu
    Bottle中文文档
  • 原文地址:https://www.cnblogs.com/f-t-q/p/10596843.html
Copyright © 2011-2022 走看看