Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/enikeishik/unityexternalmediamanager

Manager of external media files (images, audio, video) for Unity 3D
https://github.com/enikeishik/unityexternalmediamanager

unity unity3d unitypackage unityplugin

Last synced: 15 days ago
JSON representation

Manager of external media files (images, audio, video) for Unity 3D

Awesome Lists containing this project

README

        

# Unity External Media Manager (v1.0.0)

Manager of external media files (texts, images, audio, video) for Unity 3D.
Allows to pick the media file (via UnitySimpleFileBrowser)
and make some action with media file path, media data
or loads media into UI element.

## Requirements

* Unity 3D
* [UnitySimpleFileBrowser](https://github.com/yasirkula/UnitySimpleFileBrowser)

## Usage

```c#
...

public Text TextOutputUI;
public Image ImageOutputUI;
public AudioSource AudioSourceUI;
public VideoPlayer VideoPlayerUI;

protected ExternalMediaManager emm;

// Start is called before the first frame update
void Start()
{
emm = new ExternalMediaManager();
}

public void ButtonPickTextClick()
{
emm.SetText(
(string path) =>
{
string text = emm.GetText(path);
Debug.Log("Text loaded: " + text);

//do something with loaded text or its file path
},
TextOutputUI
);
}

public void ButtonPickImageClick()
{
emm.SetImage(
(string path) =>
{
//do something with picked image file path
},
ImageOutputUI
);
}

public void ButtonPickAudioClick()
{
emm.SetAudio(
(string path) =>
{
//do something with picked audio file path
},
AudioSourceUI
);
}

public void ButtonPickVideoClick()
{
emm.SetVideo(
(string path) =>
{
//do something with picked video file path
},
VideoPlayerUI
);
}

...
```