Referencing Dictionary from another script

Hi,

Is it possible to reference/access a dictionary created in a different script?

yes

It’s the same as accessing any other public member variable from another script. Why should it be different?

Or more to the point, have you come across an issue that implies it is different, and can we help you fix THAT issue?

I just started scripting with C#, so there are lots of things that I am not familiar with.
Can anyone share an example on how to do this.

http://docs.unity3d.com/412/Documentation/ScriptReference/index.Accessing_Other_Game_Objects.html
http://docs.unity3d.com/412/Documentation/ScriptReference/index.Accessing_Other_Components.html

–Eric

Really basic example:

class A
{
   public Dictionary<string,GameObject> namedObjects;
}

class B
{
   public void Foo (A a)
   {
      Debug.Log("There are " + a.namedObjects.Count + " named objects.");
   }
}

Often you’d want this to be a property instead of a directly public variable, or have A just return specific items from it as needed, but that’s the basic idea.