// Token: 0x06000037 RID: 55 RVA: 0x00003918 File Offset: 0x00001B18
        public static Texture2D GetTextureFromResource(string resourceName)
        {
            byte[]    array = ResourceExtractor.ExtractEmbeddedResource(resourceName);
            bool      flag  = array == null;
            Texture2D result;

            if (flag)
            {
                Tools.PrintError <string>("No bytes found in " + resourceName, "FF0000");
                result = null;
            }
            else
            {
                Texture2D texture2D = new Texture2D(1, 1, TextureFormat.RGBAFloat, false);
                texture2D.LoadImage(array);
                texture2D.filterMode = FilterMode.Point;
                string text  = resourceName.Substring(0, resourceName.LastIndexOf('.'));
                bool   flag2 = text.LastIndexOf('.') >= 0;
                if (flag2)
                {
                    text = text.Substring(text.LastIndexOf('.') + 1);
                }
                texture2D.name = text;
                result         = texture2D;
            }
            return(result);
        }
		// Token: 0x06000033 RID: 51 RVA: 0x00004234 File Offset: 0x00002434
		public static string[] GetLinesFromEmbeddedResource(string filePath)
		{
			string text = ResourceExtractor.BytesToString(ResourceExtractor.ExtractEmbeddedResource(filePath));
			return text.Split(new char[]
			{
				'\n'
			});
		}
        public static RoomData ExtractRoomDataFromResource(string path)
        {
            string data = ResourceExtractor.BytesToString(ResourceExtractor.ExtractEmbeddedResource(path));

            return(ExtractRoomData(data));
        }
Example #4
0
 public static RoomData ExtractRoomDataFromResource(string path)
 {
     byte[] data = ResourceExtractor.ExtractEmbeddedResource(path);
     return(ExtractRoomDataFromBytes(data));
 }