Skip to content

Commit

Permalink
initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
chiepomme committed Jul 21, 2017
1 parent 5bb82c9 commit e95196f
Show file tree
Hide file tree
Showing 135 changed files with 4,397 additions and 0 deletions.
35 changes: 35 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
/audio.wav
/background.png
/Movie/
/.vs/

/[Ll]ibrary/
/[Tt]emp/
/[Oo]bj/
/[Bb]uild/
/[Bb]uilds/
/Assets/AssetStoreTools*

# Autogenerated VS/MD solution and project files
ExportedObj/
*.csproj
*.unityproj
*.sln
*.suo
*.tmp
*.user
*.userprefs
*.pidb
*.booproj
*.svd


# Unity3D generated meta files
*.pidb.meta

# Unity3D Generated File On Crash Reports
sysinfo.txt

# Builds
*.apk
*.unitypackage
42 changes: 42 additions & 0 deletions Assets/Controller.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
using System.Collections;
using System.IO;
using UnityEngine;
using UnityEngine.UI;
using UTJ.FrameCapturer;

public class Controller : MonoBehaviour
{
[SerializeField]
MovieRecorder recorder;
[SerializeField]
RawImage image;

IEnumerator Start()
{
Screen.SetResolution(512, 512, false);

if (File.Exists("background.png"))
{
var imageWWW = new WWW("file://" + Application.dataPath + "/../background.png");
yield return imageWWW;
image.texture = imageWWW.texture;
}
else if (File.Exists("background.jpg"))
{
var imageWWW = new WWW("file://" + Application.dataPath + "/../background.jpg");
yield return imageWWW;
image.texture = imageWWW.texture;
}

var audiosource = gameObject.AddComponent<AudioSource>();
var audioWWW = new WWW("file://" + Application.dataPath + "/../audio.wav");
yield return audioWWW;
audiosource.clip = audioWWW.GetAudioClip(false);
audiosource.Play();

recorder.BeginRecording();
yield return new WaitWhile(() => audiosource.isPlaying);
recorder.EndRecording();
Application.Quit();
}
}
12 changes: 12 additions & 0 deletions Assets/Controller.cs.meta

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Binary file added Assets/Main.unity
Binary file not shown.
8 changes: 8 additions & 0 deletions Assets/Main.unity.meta

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 9 additions & 0 deletions Assets/StreamingAssets.meta

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 9 additions & 0 deletions Assets/StreamingAssets/UTJ.meta

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 9 additions & 0 deletions Assets/StreamingAssets/UTJ/FrameCapturer.meta

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit e95196f

Please sign in to comment.