Commit cff29e50 authored by Ray Ortgiesen's avatar Ray Ortgiesen 🥒
Browse files

Adding plugin to git tracker

parent da5463a6
fileFormatVersion: 2
guid: 869fc009969608e4a9071237c584be0d
DefaultImporter:
userData:
fileFormatVersion: 2
guid: 76c19abd24bec62459b5f0d26fdd9a85
folderAsset: yes
DefaultImporter:
userData:
/************************************************************************************
Copyright : Copyright 2014 Oculus VR, LLC. All Rights reserved.
Licensed under the Oculus VR Rift SDK License Version 3.3 (the "License");
you may not use the Oculus VR Rift SDK except in compliance with the License,
which is provided at the time of installation or download, or which
otherwise accompanies this software in either electronic or hard copy form.
You may obtain a copy of the License at
http://www.oculus.com/licenses/LICENSE-3.3
Unless required by applicable law or agreed to in writing, the Oculus VR SDK
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
************************************************************************************/
using UnityEngine;
using UnityEditor;
/// <summary>
/// Allows Oculus to build apps from the command line.
/// </summary>
partial class OculusBuildApp
{
static void SetAndroidTarget()
{
#if UNITY_5
EditorUserBuildSettings.androidBuildSubtarget = MobileTextureSubtarget.ASTC;
#else
EditorUserBuildSettings.androidBuildSubtarget = AndroidBuildSubtarget.ETC2;
#endif
if (EditorUserBuildSettings.activeBuildTarget != BuildTarget.Android)
{
EditorUserBuildSettings.SwitchActiveBuildTarget(BuildTarget.Android);
}
}
}
fileFormatVersion: 2
guid: fef522d0247215a43be6b1a8819bd940
MonoImporter:
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
using UnityEngine;
using UnityEditor;
using System.IO;
/// <summary>
/// From the selected transform, takes a cubemap screenshot that can be submitted with the application
/// as a screenshot (or additionally used for reflection shaders).
/// </summary>
class OVRScreenshotWizard : ScriptableWizard
{
public enum TexFormat
{
JPEG, // 512kb at 1k x 1k resolution vs
PNG, // 5.3mb
}
public enum SaveMode {
SaveCubemapScreenshot,
SaveUnityCubemap,
SaveBoth,
}
public GameObject renderFrom = null;
public CubemapSize size = CubemapSize.Size_2048x2048;
public SaveMode saveMode = SaveMode.SaveUnityCubemap;
public string cubeMapFolder = "Assets/Textures/Cubemaps";
public TexFormat textureFormat = TexFormat.PNG;
/// <summary>
/// Validates the user's input
/// </summary>
void OnWizardUpdate()
{
helpString = "Select a game object positioned in the place where\nyou want to render the cubemap screenshot from: ";
isValid = (renderFrom != null);
}
/// <summary>
/// Create the asset path if it is not available.
/// Assuming the newFolderPath is stated with "Assets", which is a requirement.
/// </summary>
static bool CreateAssetPath( string newFolderPath )
{
const int maxFoldersCount = 32;
string currentPath;
string[] pathFolders;
pathFolders = newFolderPath.Split (new char[]{ '/' }, maxFoldersCount);
if (!string.Equals ("Assets", pathFolders [0], System.StringComparison.OrdinalIgnoreCase))
{
Debug.LogError( "Folder path has to be started with \" Assets \" " );
return false;
}
currentPath = "Assets";
for (int i = 1; i < pathFolders.Length; i++)
{
if (!string.IsNullOrEmpty(pathFolders[i]))
{
string newPath = currentPath + "/" + pathFolders[i];
if (!AssetDatabase.IsValidFolder(newPath))
AssetDatabase.CreateFolder(currentPath, pathFolders[i]);
currentPath = newPath;
}
}
Debug.Log( "Created path: " + currentPath );
return true;
}
/// <summary>
/// Renders the cubemap
/// </summary>
void OnWizardCreate()
{
if ( !AssetDatabase.IsValidFolder( cubeMapFolder ) )
{
if (!CreateAssetPath(cubeMapFolder))
{
Debug.LogError( "Created path failed: " + cubeMapFolder );
return;
}
}
bool existingCamera = true;
bool existingCameraStateSave = true;
Camera camera = renderFrom.GetComponent<Camera>();
if (camera == null)
{
camera = renderFrom.AddComponent<Camera>();
camera.farClipPlane = 10000f;
existingCamera = false;
}
else
{
existingCameraStateSave = camera.enabled;
camera.enabled = true;
}
// find the last screenshot saved
if (cubeMapFolder[cubeMapFolder.Length-1] != '/')
{
cubeMapFolder += "/";
}
int idx = 0;
string[] fileNames = Directory.GetFiles(cubeMapFolder);
foreach(string fileName in fileNames)
{
if (!fileName.ToLower().EndsWith(".cubemap"))
{
continue;
}
string temp = fileName.Replace(cubeMapFolder + "vr_screenshot_", string.Empty);
temp = temp.Replace(".cubemap", string.Empty);
int tempIdx = 0;
if (int.TryParse( temp, out tempIdx ))
{
if (tempIdx > idx)
{
idx = tempIdx;
}
}
}
string pathName = string.Format("{0}vr_screenshot_{1}.cubemap", cubeMapFolder, (++idx).ToString("d2"));
Cubemap cubemap = new Cubemap((int)size, TextureFormat.RGB24, false);
// render into cubemap
if ((camera != null) && (cubemap != null))
{
// set up cubemap defaults
camera.RenderToCubemap(cubemap);
if (existingCamera)
{
camera.enabled = existingCameraStateSave;
}
else
{
DestroyImmediate(camera);
}
// generate a regular texture as well?
if ( ( saveMode == SaveMode.SaveCubemapScreenshot ) || ( saveMode == SaveMode.SaveBoth ) )
{
GenerateTexture(cubemap, pathName);
}
if ( ( saveMode == SaveMode.SaveUnityCubemap ) || ( saveMode == SaveMode.SaveBoth ) )
{
Debug.Log( "Saving: " + pathName );
// by default the unity cubemap isn't saved
AssetDatabase.CreateAsset( cubemap, pathName );
// reimport as necessary
AssetDatabase.SaveAssets();
// select it in the project tree so developers can find it
EditorGUIUtility.PingObject( cubemap );
Selection.activeObject = cubemap;
}
AssetDatabase.Refresh();
}
}
/// <summary>
/// Generates a NPOT 6x1 cubemap in the following format PX NX PY NY PZ NZ
/// </summary>
void GenerateTexture(Cubemap cubemap, string pathName)
{
// Encode the texture and save it to disk
pathName = pathName.Replace(".cubemap", (textureFormat == TexFormat.PNG) ? ".png" : ".jpg" ).ToLower();
pathName = pathName.Replace( cubeMapFolder.ToLower(), "" );
string format = textureFormat.ToString();
string fullPath = EditorUtility.SaveFilePanel( string.Format( "Save Cubemap Screenshot as {0}", format ), "", pathName, format.ToLower() );
if ( !string.IsNullOrEmpty( fullPath ) )
{
Debug.Log( "Saving: " + fullPath );
OVRCubemapCapture.SaveCubemapCapture(cubemap, fullPath);
}
}
/// <summary>
/// Unity Editor menu option to take a screenshot
/// </summary>
[MenuItem("Tools/Oculus/OVR Screenshot Wizard",false,100000)]
static void TakeOVRScreenshot()
{
OVRScreenshotWizard wizard = ScriptableWizard.DisplayWizard<OVRScreenshotWizard>("OVR Screenshot Wizard", "Render Cubemap");
if (wizard != null)
{
if (Selection.activeGameObject != null)
wizard.renderFrom = Selection.activeGameObject;
else
wizard.renderFrom = Camera.main.gameObject;
wizard.isValid = (wizard.renderFrom != null);
}
}
}
fileFormatVersion: 2
guid: b8b9ee1d7b188284f90d944cd54eb026
timeCreated: 1462825988
licenseType: Pro
MonoImporter:
serializedVersion: 2
defaultReferences:
- renderFrom: {fileID: 168286, guid: a5014611cefbb6b4398b7e4c82203d08, type: 2}
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
fileFormatVersion: 2
guid: 981b5bce7fc4a2d43a2169710da4b892
DefaultImporter:
userData:
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!21 &2100000
Material:
serializedVersion: 3
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_Name: Arrow
m_Shader: {fileID: 10101, guid: 0000000000000000e000000000000000, type: 0}
m_ShaderKeywords: []
m_CustomRenderQueue: -1
m_SavedProperties:
serializedVersion: 2
m_TexEnvs:
data:
first:
name: _MainTex
second:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
m_Floats:
data:
first:
name: _Shininess
second: .699999988
data:
first:
name: _Stencil
second: 0
data:
first:
name: _StencilReadMask
second: 255
data:
first:
name: _StencilWriteMask
second: 255
data:
first:
name: _StencilComp
second: 8
data:
first:
name: _StencilOp
second: 1
data:
first:
name: _ColorMask
second: 15
m_Colors:
data:
first:
name: _Color
second: {r: 1, g: 0, b: 0, a: 1}
data:
first:
name: _Emission
second: {r: 0, g: 0, b: 0, a: 0}
data:
first:
name: _SpecColor
second: {r: 1, g: 1, b: 1, a: 1}
fileFormatVersion: 2
guid: 669025377795b574da66d9bb2472fcab
NativeFormatImporter:
userData:
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!21 &2100000
Material:
serializedVersion: 5
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_Name: CubeMaterial
m_Shader: {fileID: 7, guid: 0000000000000000f000000000000000, type: 0}
m_ShaderKeywords:
m_LightmapFlags: 5
m_CustomRenderQueue: -1
m_SavedProperties:
serializedVersion: 2
m_TexEnvs:
data:
first:
name: _MainTex
second:
m_Texture: {fileID: 2800000, guid: 020d1a102a7f2a14ebf6cefe7b977303, type: 3}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
m_Floats: {}
m_Colors:
data:
first:
name: _Color
second: {r: 1, g: 1, b: 1, a: 1}
fileFormatVersion: 2
guid: 62db2d638434d5a488dfb1e789e34b37
NativeFormatImporter:
userData:
fileFormatVersion: 2
guid: db348133d6680dd459f3e1cb19922746
folderAsset: yes
DefaultImporter:
userData:
# Alias OBJ Model File
# Exported from SketchUp, (c) 2000-2012 Trimble Navigation Limited
# File units = meters
mtllib cone.mtl
g Mesh1 Model
usemtl FrontColor
v 0.492734 0 0.0849313
vt -19.399 -3.34375
vn 0 -1 -0
v 0.453963 0 0.209566
vt -17.8725 -8.25064
v 0.384254 0 0.31992
vt -15.1281 -12.5953
v 0.28836 0 0.408471
vt -11.3528 -16.0815
v 0.172814 0 0.469186
vt -6.80371 -18.4719
v 0.0454916 0 0.497926
vt -1.79101 -19.6034
v -0.0849313 0 0.492734
vt 3.34375 -19.399
v -0.209566 0 0.453963
vt 8.25064 -17.8725
v -0.31992 0 0.384254
vt 12.5953 -15.1281
v -0.408471 0 0.28836
vt 16.0815 -11.3528
v -0.469186 0 0.172814
vt 18.4719 -6.80371
v -0.497926 0 0.0454916
vt 19.6034 -1.79101
v -0.492734 0 -0.0849313
vt 19.399 3.34375
v -0.453963 0 -0.209566
vt 17.8725 8.25064
v -0.384254 0 -0.31992
vt 15.1281 12.5953
v -0.28836 0 -0.408471
vt 11.3528 16.0815
v -0.172814 0 -0.469186
vt 6.80371 18.4719
v -0.0454916 0 -0.497926
vt 1.79101 19.6034
v 0.0849313 0 -0.492734
vt -3.34375 19.399
v 0.209566 0 -0.453963
vt -8.25064 17.8725
v 0.31992 0 -0.384254
vt -12.5953 15.1281
v 0.408471 0 -0.28836
vt -16.0815 11.3528
v 0.469186 0 -0.172814
vt -18.4719 6.80371
v 0.497926 0 -0.0454916
vt -19.6034 1.79101
f 1/1/1 2/2/1 3/3/1 4/4/1 5/5/1 6/6/1 7/7/1 8/8/1 9/9/1 10/10/1 11/11/1 12/12/1 13/13/1 14/14/1 15/15/1 16/16/1 17/17/1 18/18/1 19/19/1 20/20/1 21/21/1 22/22/1 23/23/1 24/24/1
vt -2.56941 -8.65407
vn 0.812403 0.446486 0.375036
vt 2.56941 -8.65407
vn 0.881787 0.446486 0.151991
v 0.00100113 1 0.000172563
vt 0.00522052 35.2704
v 0.000922359 1 0.000425796
vt -0.00522052 35.2704
f 2/25/2 1/26/3 25/27/3 26/28/2
vn 0.891079 0.446486 -0.0814109
v 0.00101168 1 -9.24296e-005
f 1/25/3 24/26/4 27/27/4 25/28/3
vn 0.839646 0.446486 -0.309265
v 0.000953289 1 -0.000351123
f 27/28/4 24/25/4 23/26/5 28/27/5
vn 0.730992 0.446486 -0.516044
v 0.000829929 1 -0.000585888
f 28/28/5 23/25/5 22/26/6 29/27/6
vn 0.572522 0.446486 -0.687654
v 0.000650011 1 -0.000780726
f 29/28/6 22/25/6 21/26/7 30/27/7
vn 0.375036 0.446486 -0.812403
v 0.000425796 1 -0.000922359
f 30/28/7 21/25/7 20/26/8 31/27/8
vn 0.151991 0.446486 -0.881787
v 0.000172563 1 -0.00100113
f 31/28/8 20/25/8 19/26/9 32/27/9
vn -0.0814109 0.446486 -0.891079
v -9.24296e-005 1 -0.00101168
f 32/28/9 19/25/9 18/26/10 33/27/10
vn -0.309265 0.446486 -0.839646
v -0.000351123 1 -0.000953289
f 33/28/10 18/25/10 17/26/11 34/27/11
vn -0.516044 0.446486 -0.730992
v -0.000585888 1 -0.000829929
f 34/28/11 17/25/11 16/26/12 35/27/12
vn -0.687654 0.446486 -0.572522
v -0.000780726 1 -0.000650011
f 35/28/12 16/25/12 15/26/13 36/27/13
vn -0.812403 0.446486 -0.375036
v -0.000922359 1 -0.000425796
f 36/28/13 15/25/13 14/26/14 37/27/14
vn -0.881787 0.446486 -0.151991
v -0.00100113 1 -0.000172563
f 37/28/14 14/25/14 13/26/15 38/27/15
vn -0.891079 0.446486 0.0814109
v -0.00101168 1 9.24296e-005
f 38/28/15 13/25/15 12/26/16 39/27/16
vn -0.839646 0.446486 0.309265
v -0.000953289 1 0.000351123
f 12/25/16 11/26/17 40/27/17 39/28/16
vn -0.730992 0.446486 0.516044
v -0.000829929 1 0.000585888
f 11/25/17 10/26/18 41/27/18 40/28/17
vn -0.572522 0.446486 0.687654
v -0.000650011 1 0.000780726
f 10/25/18 9/26/19 42/27/19 41/28/18
vn -0.375036 0.446486 0.812403
v -0.000425796 1 0.000922359
f 9/25/19 8/26/20 43/27/20 42/28/19
vn -0.151991 0.446486 0.881787
v -0.000172563 1 0.00100113
f 8/25/20 7/26/21 44/27/21 43/28/20
vn 0.0814109 0.446486 0.891079
v 9.24296e-005 1 0.00101168
f 7/25/21 6/26/22 45/27/22 44/28/21
vn 0.309265 0.446486 0.839646
v 0.000351123 1 0.000953289
f 6/25/22 5/26/23 46/27/23 45/28/22
vn 0.516044 0.446486 0.730992
v 0.000585888 1 0.000829929
f 5/25/23 4/26/24 47/27/24 46/28/23
vn 0.687654 0.446486 0.572522
v 0.000780726 1 0.000650011
f 4/25/24 3/26/25 48/27/25 47/28/24
f 3/25/25 2/26/2 26/27/2 48/28/25
vt 0.0398301 0.00363896
vn 0 1 -0
vt 0.0375311 0.0138237
vt 0.0326744 0.0230665
vt 0.025591 0.0307372
vt 0.0167636 0.0363133
vt 0.00679382 0.0394147
vt -0.00363896 0.0398301
vt -0.0138237 0.0375311
vt -0.0230665 0.0326744
vt -0.0307372 0.025591
vt -0.0363133 0.0167636
vt -0.0394147 0.00679382
vt -0.0398301 -0.00363896
vt -0.0375311 -0.0138237
vt -0.0326744 -0.0230665
vt -0.025591 -0.0307372
vt -0.0167636 -0.0363133
vt -0.00679382 -0.0394147
vt 0.00363896 -0.0398301
vt 0.0138237 -0.0375311
vt 0.0230665 -0.0326744
vt 0.0307372 -0.025591
vt 0.0363133 -0.0167636
vt 0.0394147 -0.00679382
f 27/29/26 28/30/26 29/31/26 30/32/26 31/33/26 32/34/26 33/35/26 34/36/26 35/37/26 36/38/26 37/39/26 38/40/26 39/41/26 40/42/26 41/43/26 42/44/26 43/45/26 44/46/26 45/47/26 46/48/26 47/49/26 48/50/26 26/51/26 25/52/26
fileFormatVersion: 2
guid: c28fa8d61f81fb742b1180a6d4516625
ModelImporter:
serializedVersion: 16
fileIDToRecycleName:
100000: //RootNode
100002: Mesh1_Model
400000: //RootNode
400002: Mesh1_Model
2300000: Mesh1_Model
3300000: Mesh1_Model
4300000: Mesh1_Model
9500000: //RootNode
materials:
importMaterials: 0
materialName: 0
materialSearch: 1
animations:
legacyGenerateAnimations: 4
bakeSimulation: 0
optimizeGameObjects: 0
motionNodeName:
animationCompression: 1
animationRotationError: .5
animationPositionError: .5
animationScaleError: .5