public void SetParameters(string fileName, string subDir, int maxWidth, int maxHeight, bool bestFit, bool showCamera, bool useDefault)
    {
        if (Initialize())
        {
            return;
        }

        data            = new ImagePickerData();
        data.bestFit    = bestFit;
        data.showCamera = showCamera;
        data.useDefault = useDefault;

        data.fileName         = fileName;
        data.fileSubDir       = subDir;
        data.maxWidth         = maxWidth;
        data.maxHeight        = maxHeight;
        data.gameObject       = name;
        data.callback         = LiteCallback;
        data.callbackOnCancel = OnCancel;

        //override mode for testing
        data.mode = 4;

        //comment any of these out to remove them
        data.debugError   = OnError;
        data.debugWarning = OnWarning;
        data.debugVerbose = OnVerbose;
    }
Exemple #2
0
    public override void  Start()
    {
        base.Start();
        imagePicker = GetOrCreateComponent <ImagePicker>();
        data        = new ImagePickerData(null, null, "Gallery", 1600, 1600, true, true);

        data.gameObject = gameObject.name;
        data.callback   = CustomeReceiver;
    }
Exemple #3
0
    void SetupPicker()
    {
        if (picker == null)
        {
            picker = SmartMonoBehaviour.FindOrCreate <ImagePicker>();
        }

        data            = new ImagePickerData();
        data.gameObject = name;
        data.callback   = ReceiveFilename;
        data.showCamera = true;
    }