Skip to content

Commit 88e565d

Browse files
author
Patrick Curry
committed
Tsugi example app created with Unity.
0 parents  commit 88e565d

24 files changed

Lines changed: 222 additions & 0 deletions

.gitignore

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# Ignore misc OS files...
2+
.DS_Store
3+
.DS_Store?
4+
._*
5+
.Spotlight-V100
6+
.Trashes
7+
ehthumbs.db
8+
Thumbs.db
9+
10+
# Ignore Unity artifacts
11+
Library
12+
Temp
13+
*.csproj
14+
*.pidb
15+
*.sln
16+
*.userprefs
17+

Assets/example_icon.png

18.8 KB
Loading

Assets/example_icon.png.meta

Lines changed: 41 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Assets/example_image.png

40.5 KB
Loading

Assets/example_image.png.meta

Lines changed: 49 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Assets/example_scene.unity

13 KB
Binary file not shown.

Assets/example_scene.unity.meta

Lines changed: 2 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Assets/example_script.cs

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
// single_script.cs
2+
// Example code for small Unity project using C#
3+
4+
using UnityEngine;
5+
using System.Collections;
6+
7+
public class example_script : MonoBehaviour {
8+
9+
public Texture aTexture;
10+
11+
void OnGUI() {
12+
#if UNITY_EDITOR
13+
if (!aTexture) {
14+
Debug.LogError("Assign a Texture in the inspector.");
15+
return;
16+
}
17+
#endif
18+
// Draws a single image in a square the size of the screen
19+
int width = Screen.width;
20+
int height = Screen.height;
21+
int left = 0;
22+
int top = 0;
23+
24+
if (width > height)
25+
width = height;
26+
else
27+
height = width;
28+
29+
left = Screen.width/2 - width/2;
30+
top = Screen.height/2 - height/2;
31+
32+
GUI.DrawTexture(new Rect(left, top, width, height), aTexture);
33+
}
34+
}

Assets/example_script.cs.meta

Lines changed: 7 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Assets/example_splash.png

22.6 KB
Loading

0 commit comments

Comments
 (0)