/// <summary> /// Resolves a remote type 'FullName' to a local loaded Type (this could require more specific logic later on) /// Note: probably INCREDIBLY SLOW /// </summary> /// <param name="value"></param> /// <returns></returns> public Type Deserialize(string value) { Type ret = null; //if (cache.TryGetValue(value, out ret)) // return ret; ret = engine.GetLoadedGameplayAssembly().GetTypes().FirstOrDefault(o => o.FullName == value); if (ret == null) { Console.WriteLine("Type '{0}' not found in gameplay assembly, trying to resolve by name", value); var name = value.Substring(value.LastIndexOf('.') + 1); ret = engine.GetLoadedGameplayAssembly().GetTypes().FirstOrDefault(o => o.Name == name); // Try load anything with this name } //if (ret != null) // cache.Add(value, ret); return(ret); }