Skip to content

Commit

Permalink
demo: commit texture and change installation api to support update
Browse files Browse the repository at this point in the history
  • Loading branch information
reinterpretcat committed Oct 8, 2016
1 parent 1c81553 commit e8fe3d6
Show file tree
Hide file tree
Showing 6 changed files with 66 additions and 6 deletions.
Binary file modified unity/demo/Assets/Resources/Materials/Default.mat
Binary file not shown.
4 changes: 2 additions & 2 deletions unity/demo/Assets/Resources/Shaders/VertexColorGeneric.shader
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@

struct Input {
float2 uv_MainTex;
float2 uv2_MainTex2;
float2 uv3_MainTex3;
float2 uv2_MainTex2 : TEXCOORD1;
float2 uv3_MainTex3 : TEXCOORD2;
float4 color : COLOR;
};

Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
57 changes: 57 additions & 0 deletions unity/demo/Assets/Resources/Textures/terrain_textures.png.meta

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

7 changes: 5 additions & 2 deletions unity/demo/Assets/Scripts/Environment/InstallationApi.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ namespace Assets.Scripts.Environment
/// <summary> Provides installation API. </summary>
internal static class InstallationApi
{
private const string Version = "1.1";
private const string MarkerFileName = "install_log.txt";

/// <summary> Ensures required filesystem structure. Should be called from main thread. </summary>
Expand Down Expand Up @@ -41,6 +42,7 @@ private static IEnumerable<string> GetMapCssFileNames()
"z14.mapcss",
"z14-lines.mapcss",
"z14-polygons.mapcss",
"z16.txt",
"z16.mapcss",
"z16-buildings.mapcss",
"z16-misc.mapcss",
Expand Down Expand Up @@ -90,12 +92,13 @@ private static IEnumerable<string> GetDirectories()

private static bool IsInstalled()
{
return File.Exists(Path.Combine(EnvironmentApi.ExternalDataPath, MarkerFileName));
var file = Path.Combine(EnvironmentApi.ExternalDataPath, MarkerFileName);
return File.Exists(file) && File.ReadAllText(file) == Version;
}

private static void MarkAsInstalled()
{
File.Create(Path.Combine(EnvironmentApi.ExternalDataPath, MarkerFileName));
File.WriteAllText(Path.Combine(EnvironmentApi.ExternalDataPath, MarkerFileName), Version);
}

private static void CopyFiles(IEnumerable<string> files, ITrace trace)
Expand Down
4 changes: 2 additions & 2 deletions unity/library/UtyMap.Unity/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
// The following GUID is for the ID of the typelib if this project is exposed to COM
[assembly: Guid("97791a51-a81b-45d4-a6fc-5dfa9ebcc603")]

[assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyFileVersion("1.0.*")]
[assembly: AssemblyVersion("1.1.*")]
[assembly: AssemblyFileVersion("1.1.*")]

[assembly: InternalsVisibleTo("UtyMap.Unity.Tests")]

0 comments on commit e8fe3d6

Please sign in to comment.