Search Unity

How to create a new class from an script

Discussion in 'Scripting' started by RealidadEmpoderada, Sep 28, 2016.

  1. RealidadEmpoderada

    RealidadEmpoderada

    Joined:
    Sep 28, 2016
    Posts:
    13
    Hello,
    I need to start analizing how to create a new gameObject subclass from an script.
    And also start to create new methods form also otehr scripts.
    The idea is to insert somme object models from outside Unity.

    Any help?
     
  2. Brathnann

    Brathnann

    Joined:
    Aug 12, 2014
    Posts:
    7,188
    So...you want to write a script that creates a script?

    I will ask right off...How is your programming skill?
     
    Ainna12 likes this.
  3. oblivion-modder

    oblivion-modder

    Joined:
    Mar 18, 2015
    Posts:
    3
    just create a script then in the script you want to use it for replace monobehavours with its name in C#.
     
  4. RealidadEmpoderada

    RealidadEmpoderada

    Joined:
    Sep 28, 2016
    Posts:
    13
    I have experience in Smalltalk programming. No experience in Unity.
    Bathnann, yes it is something like you are speaking about. From a script, create a subclass w/methods and then create objects of this subclass.
    Thanks.
     
    Last edited: Sep 29, 2016
  5. RealidadEmpoderada

    RealidadEmpoderada

    Joined:
    Sep 28, 2016
    Posts:
    13
    Hi,
    It´s looks like a possibility in no runtime.
    The idea is edit some features of the objects from another editor.
    The problem is if the action is needed runtime.