private void LoadBundles() { current_bundle = AssetBundle.LoadFromFile(System.IO.Path.Combine(Application.streamingAssetsPath, "gameassets")); //type brick select in main menu print(PlayerPrefs.GetString("Type")); bricks_type = current_bundle.LoadAsset(PlayerPrefs.GetString("Type")) as BricksType; }
/// <summary> /// Initializes a new instance of the <see cref="Brick"/> class. /// </summary> /// <param name="posX">The x position of the brick.</param> /// <param name="posY">The y position of the brick.</param> /// <param name="width">The width of the brick.</param> /// <param name="height">The height of the brick.</param> /// <param name="brickType">The type of the brick.</param> /// <param name="imagePath">The image of the brick.</param> public Brick(double posX, double posY, double width, double height, string imagePath, BricksType brickType) : base(posX, posY, width, height, imagePath) { try { BrickType = brickType; } catch { } }