This class holds information about which networked scripts use which QoS channels for updates.

Ejemplo n.º 1
0
 public static void ReinitializeScriptCRCs(Assembly callingAssembly)
 {
     if (NetworkCRC.singleton == null)
     NetworkCRC.singleton = new NetworkCRC();
       NetworkCRC.singleton.m_Scripts.Clear();
       foreach (System.Type type in callingAssembly.GetTypes())
       {
     if (type.BaseType == typeof (NetworkBehaviour))
     {
       MethodInfo method = type.GetMethod(".cctor", BindingFlags.Static);
       if (method != null)
     method.Invoke((object) null, new object[0]);
     }
       }
 }
Ejemplo n.º 2
0
 /// <summary>
 /// 
 /// <para>
 /// This is used to setup script network settings CRC data.
 /// </para>
 /// 
 /// </summary>
 /// <param name="name">Script name.</param><param name="channel">QoS Channel.</param>
 public static void RegisterBehaviour(string name, int channel)
 {
     if (NetworkCRC.singleton == null)
     NetworkCRC.singleton = new NetworkCRC();
       NetworkCRC.singleton.m_Scripts[name] = channel;
 }