Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

DriveInfo.GetDrives (), NotImplementedException: The requested feature is not implemented.

Discussion in 'Scripting' started by Mementos, Jul 30, 2014.

  1. Mementos

    Mementos

    Joined:
    Sep 25, 2012
    Posts:
    79
    Hey,
    im trying to get all available volums on my android device with following code:

    Code (CSharp):
    1. using UnityEngine;
    2. using System.Collections;
    3. using System.IO;
    4.  
    5. public class Volumes : MonoBehaviour {
    6.     DriveInfo[] allDrives;
    7.  
    8.     public Vector2 scrollPosition0 = Vector2.zero;
    9.     // Use this for initialization
    10.     void Start () {
    11.         allDrives= DriveInfo.GetDrives ();
    12.     }
    13.     void Update () {
    14.  
    15.        
    16.         scrollPosition0 = GUIDrag.Update(scrollPosition0, 0);
    17.        
    18.     }
    19.     // Update is called once per frame
    20.     void OnGui () {
    21.         scrollPosition0 = GUIDrag.BeginScrollView (new Rect (10,80,1200,500),
    22.                                                    scrollPosition0, new Rect (0, 0, 500, 65*allDrives.Length), 0);
    23.        
    24.        
    25.        
    26.        
    27.        
    28.         foreach (DriveInfo dd in allDrives){
    29.             if (GUIDrag.CheckInput(GUILayout.Button(dd.VolumeLabel)))
    30.             {
    31.            
    32.             }
    33.             }
    34.         GUIDrag.EndScrollView();
    35.     }
    36. }
    But im getting this in the unity console:

    Dont wonder about the GUIDrag, im using an external plugin for the scrollview. (but already tried it without it)
    Anyone know how to fix this, or have any other idea on how to get all volumes on android devices? Directory.GetLogicalDrives only returns "/" on android :/
     
  2. Medding3000

    Medding3000

    Joined:
    Dec 11, 2013
    Posts:
    45
    NotImplementedException: The requested feature is not implemented, says exactly what is wrong.