- Home /
Why using this way class attributes are omitted?
Hi,i have a question about why this way works to access the attributes and in the other way the stay omitted.
This work
using UnityEngine;
using System.Collections;
public class Keyboard_Class : MonoBehaviour
{
public char[] Name;
public GameObject Button;
public KeyCode Value;
public char[] Charcter;
}
This does not work to access the attributes
using UnityEngine;
using System.Collections;
public class Keyboard_Class : MonoBehaviour
{
public class Keyboard
{
public char[] Name;
public class Key
{
public GameObject Button;
public Input Value;
public char[] Charcter;
public Key()
{
Button=null;
Value=null;
Charcter=null;
}
public Key(GameObject button,Input myvalue,char[] mychar)
{
Button=button;
Value=myvalue;
Charcter=mychar;
}
}
public Keyboard()
{
Name=null;
}
public Keyboard(char[] name)
{
int i=0;
for(;i<name.Length;i++)Name[i]=name[i];
Name[i]='\0';
}
}
}
PS.I see a error in the image.Instead Key.Value , I put key.Name or key.Key, okay? xD
Comment
Odd. This question was on the site like normal, published questions, yet it had a "The question is waiting approval by a moderator." below it. I published it normally, from the more-menu and it popped to the front.
Your answer
Follow this Question
Related Questions
Splitting with Partial Classes 0 Answers
About Classes in js 2 Answers
Question : How to create main menu ? 2 Answers
Camera speed 2 Answers
Audio loop 3 Answers