Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice
  3. Join us on November 16th, 2023, between 1 pm and 9 pm CET for Ask the Experts Online on Discord and on Unity Discussions.
    Dismiss Notice

A monobehaviour Class variables shown in the Inspector of another monobehaviour class ?

Discussion in 'Editor & General Support' started by darksire, Mar 24, 2015.

  1. darksire

    darksire

    Joined:
    Dec 16, 2013
    Posts:
    10
    Can I view the variables of a monobehaviour class on a second monobehaviour class inspector?
    like if its a simple class .
     
  2. Deleted User

    Deleted User

    Guest

    Monos need to be attached to GameObjects, because of that, you can't view the variables of a Monos from another Mono since you can just edit them from the inspector of the GameObject they're located on.

    What you might need is either a ScriptableObject or a Serilizable class.
     
  3. blizzy

    blizzy

    Joined:
    Apr 27, 2014
    Posts:
    775
    I think you misread his first sentence. He wants to have a second inspector, I'm guessing to view the variables of two GameObjects at once.
     
  4. darksire

    darksire

    Joined:
    Dec 16, 2013
    Posts:
    10
    all monobehaviour class are serilizable so i dont need to put there serilizable
    monoscript.jpg