public static PrototypeDungeonRoom BuildFromAssetBundle(AssetBundle[] Bundles, string assetPath, bool setRoomCategory = false, bool autoAssignToFloor = false, bool assignDecorationSettings = false) { TextAsset m_Asset = ExpandAssets.LoadAsset <TextAsset>(assetPath); if (m_Asset) { Texture2D texture = ExpandUtility.BytesToTexture(m_Asset.bytes, m_Asset.name); RoomData roomData = ExtractRoomDataFromTextAssetBytes(m_Asset); return(Build(Bundles, texture, roomData, setRoomCategory, autoAssignToFloor, assignDecorationSettings, roomData.weight)); } else { ETGModConsole.Log("[ExpandTheGungeon] ERROR: RoomFactory asset: " + assetPath + " was not found!"); return(null); } }