Firstly i am unable to use System.Drawing in my c# script for some reason . I'm working in Unity3d and the library reference gets kicked out each time i load the script.
i am access the resources of my dll using this method
//DaiM.Reality is the namespace
// fgla is a class
Assembly asm = typeof(DaiM.Reality.fgla).Assembly;
string resourcename = asm.GetName().Name + ".Properties.Resources";
ResourceManager rm = new ResourceManager(resourcename, asm);
Texture2D imh = (Texture2D)rm.GetObject("flag"); // the problem
// error :: InvalidCastException: Cannot cast from source type to destination type.
if I could used System.Drawing then i could just read the pixels from the bitmap and apply them to a new Texture2D. but unity wont let me use System.Drawing . I guess that is because some of the classes in the System.Drawing library and UnityEngine library conflict