Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unity Build running for PRs (and Tests) #532

Merged
merged 17 commits into from
Dec 17, 2019
Merged
Show file tree
Hide file tree
Changes from 13 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
13 changes: 1 addition & 12 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,16 +7,5 @@ before_script:
- sudo chmod -R a+rwx /Applications/Unity
script:
- msbuild ./GLTFSerialization/GLTFSerialization.sln /t:GLTFSerialization /p:TargetFramework=net35
- "./scripts/export-unity-package.sh"
deploy:
provider: releases
file:
- "./current-package/UnityGLTF.unitypackage"
skip_cleanup: true
on:
repo: KhronosGroup/UnityGLTF
branch: releases
tags: true
api-key:
secure: "KBs5cOzqEoTDzsBv6AurzlFMtgfctKbJWsGorUW9BE/+B8pnriGQxc1Lt83kzkvHkcF+MgqD5M1KK6SebB/lgpE2Xo/Zu/al1Sr0M6MNijRgHCx0aqea+/mjXfHS7qhbOqgEqQHYoR4kOqIKFhJZOohtLBylnDgFojG42Z2UFnbSelZaAT8qISxndX5qjIqV9+CgkRlpwyY4tnQ2fzVwuyFMvEqSBUzAegzPa+nQu1HgJzx64OP0ONmoTPJnUr0C741GtsD1fA6SMjSpwhjiYezQXapN2a/YoZufEkrd5wYq8Q1UVNMDmkmtg1zA0LkmK1u6dEhE7VCjxL7CW13FWGWEMKR9h2afTl+QkRIZxNRxjVHcWG122oTSCOXaAwBtNHMnWEgBy+DYFWAYD/bMmZ+g70EZ2/bFEfPprhyOvK59No5V65FOyoIMSBZvgU1z2Kl3PPTUl/0vEljX3RiON6BvIbOxU7OdR+OI35naSfos76YWK58+b99fRC0rJq6egwhNTACPItrtdmZq13k/5PWfGSJ0IAegdoXCB1eFP6SqcoXDsxLJph8/nHrEHqyjtl9PYBturvzVfQThTzL4FQuB7Fypwql/PXB7mdG7HkOvcM5jJWiupIsQxw5VkArZhnBk188ds+UC42tUhF701ZrPJz6GF0Kqem7/Fr/6l7A="
- "./scripts/build-unity-project-and-run-tests.sh"

256 changes: 34 additions & 222 deletions UnityGLTF/Assets/Main.unity
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ RenderSettings:
m_ReflectionIntensity: 1
m_CustomReflection: {fileID: 0}
m_Sun: {fileID: 0}
m_IndirectSpecularColor: {r: 0.45030367, g: 0.49799693, b: 0.56280375, a: 1}
m_IndirectSpecularColor: {r: 0.4482447, g: 0.49827188, b: 0.5755814, a: 1}
--- !u!157 &3
LightmapSettings:
m_ObjectHideFlags: 0
Expand Down Expand Up @@ -71,7 +71,7 @@ LightmapSettings:
m_FinalGatherFiltering: 1
m_FinalGatherRayCount: 256
m_ReflectionCompression: 2
m_MixedBakeMode: 1
m_MixedBakeMode: 2
m_BakeBackend: 0
m_PVRSampling: 1
m_PVRDirectSampleCount: 32
Expand Down Expand Up @@ -113,196 +113,73 @@ NavMeshSettings:
debug:
m_Flags: 0
m_NavMeshData: {fileID: 0}
--- !u!1001 &10002063
--- !u!1001 &468343020
Prefab:
m_ObjectHideFlags: 0
serializedVersion: 2
m_Modification:
m_TransformParent: {fileID: 0}
m_Modifications:
- target: {fileID: 4000011406631220, guid: 5255039e40b37b14fbcc0b72a30fc62e, type: 2}
- target: {fileID: 4225727463385260, guid: 426ae0d14f1f31f48af072147ac6abe9, type: 2}
propertyPath: m_LocalPosition.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 4000011406631220, guid: 5255039e40b37b14fbcc0b72a30fc62e, type: 2}
- target: {fileID: 4225727463385260, guid: 426ae0d14f1f31f48af072147ac6abe9, type: 2}
propertyPath: m_LocalPosition.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 4000011406631220, guid: 5255039e40b37b14fbcc0b72a30fc62e, type: 2}
- target: {fileID: 4225727463385260, guid: 426ae0d14f1f31f48af072147ac6abe9, type: 2}
propertyPath: m_LocalPosition.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 4000011406631220, guid: 5255039e40b37b14fbcc0b72a30fc62e, type: 2}
- target: {fileID: 4225727463385260, guid: 426ae0d14f1f31f48af072147ac6abe9, type: 2}
propertyPath: m_LocalRotation.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 4000011406631220, guid: 5255039e40b37b14fbcc0b72a30fc62e, type: 2}
- target: {fileID: 4225727463385260, guid: 426ae0d14f1f31f48af072147ac6abe9, type: 2}
propertyPath: m_LocalRotation.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 4000011406631220, guid: 5255039e40b37b14fbcc0b72a30fc62e, type: 2}
- target: {fileID: 4225727463385260, guid: 426ae0d14f1f31f48af072147ac6abe9, type: 2}
propertyPath: m_LocalRotation.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 4000011406631220, guid: 5255039e40b37b14fbcc0b72a30fc62e, type: 2}
- target: {fileID: 4225727463385260, guid: 426ae0d14f1f31f48af072147ac6abe9, type: 2}
propertyPath: m_LocalRotation.w
value: 1
objectReference: {fileID: 0}
- target: {fileID: 4000011406631220, guid: 5255039e40b37b14fbcc0b72a30fc62e, type: 2}
- target: {fileID: 4225727463385260, guid: 426ae0d14f1f31f48af072147ac6abe9, type: 2}
propertyPath: m_RootOrder
value: 3
objectReference: {fileID: 0}
- target: {fileID: 114000010638385648, guid: 5255039e40b37b14fbcc0b72a30fc62e,
type: 2}
propertyPath: Url
value: http://localhost:8080/glTF-Sample-Models/2.0/AnimatedCube/glTF/AnimatedCube.gltf
objectReference: {fileID: 0}
- target: {fileID: 114000010638385648, guid: 5255039e40b37b14fbcc0b72a30fc62e,
type: 2}
propertyPath: GLTFStandard
value:
objectReference: {fileID: 4800000, guid: a5732b1b5b2e36d47a3da75e187eba06, type: 3}
- target: {fileID: 114000010638385648, guid: 5255039e40b37b14fbcc0b72a30fc62e,
type: 2}
propertyPath: Multithreaded
value: 1
objectReference: {fileID: 0}
- target: {fileID: 114000010638385648, guid: 5255039e40b37b14fbcc0b72a30fc62e,
- target: {fileID: 114843937143698750, guid: 426ae0d14f1f31f48af072147ac6abe9,
type: 2}
propertyPath: GLTFUri
value:
value: http://localhost:8080/glTF-Asset-Generator/Output/Positive/Material/Material_07.gltf
objectReference: {fileID: 0}
- target: {fileID: 4000011406631220, guid: 5255039e40b37b14fbcc0b72a30fc62e, type: 2}
propertyPath: m_LocalScale.x
value: 1
- target: {fileID: 114843937143698750, guid: 426ae0d14f1f31f48af072147ac6abe9,
type: 2}
propertyPath: UseStream
value: 0
objectReference: {fileID: 0}
- target: {fileID: 4000011406631220, guid: 5255039e40b37b14fbcc0b72a30fc62e, type: 2}
propertyPath: m_LocalScale.y
- target: {fileID: 114843937143698750, guid: 426ae0d14f1f31f48af072147ac6abe9,
type: 2}
propertyPath: loadOnStart
value: 1
objectReference: {fileID: 0}
- target: {fileID: 4000011406631220, guid: 5255039e40b37b14fbcc0b72a30fc62e, type: 2}
propertyPath: m_LocalScale.z
value: 1
- target: {fileID: 114819471581835328, guid: 426ae0d14f1f31f48af072147ac6abe9,
type: 2}
propertyPath: distance
value: 1.283
objectReference: {fileID: 0}
- target: {fileID: 114000010638385648, guid: 5255039e40b37b14fbcc0b72a30fc62e,
- target: {fileID: 114819471581835328, guid: 426ae0d14f1f31f48af072147ac6abe9,
type: 2}
propertyPath: loadOnStart
value: 0
propertyPath: m_Enabled
value: 1
objectReference: {fileID: 0}
m_RemovedComponents: []
m_ParentPrefab: {fileID: 100100000, guid: 5255039e40b37b14fbcc0b72a30fc62e, type: 2}
m_ParentPrefab: {fileID: 100100000, guid: 426ae0d14f1f31f48af072147ac6abe9, type: 2}
m_IsPrefabParent: 0
--- !u!114 &10002067 stripped
MonoBehaviour:
Copy link
Contributor

@AdamMitchell-ms AdamMitchell-ms Dec 16, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What are all of these changes in practice? #Resolved

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Instead of a custom light, camera, and GLTF component, using the TestScenePrefab that already contains all 3. The Main scene essentially becomes that prefab used by the test, plus a floor and the parts to easily pick which model you want loaded.


In reply to: 358474507 [](ancestors = 358474507)

m_PrefabParentObject: {fileID: 114000010638385648, guid: 5255039e40b37b14fbcc0b72a30fc62e,
type: 2}
m_PrefabInternal: {fileID: 10002063}
m_Script: {fileID: 11500000, guid: 9087a95f22bcee64ebc45f6deec08714, type: 3}
--- !u!1 &328853373
GameObject:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 100002, guid: 49a0e923d39ec3c4c8bb97699e2f2903, type: 2}
m_PrefabInternal: {fileID: 0}
serializedVersion: 5
m_Component:
- component: {fileID: 328853379}
- component: {fileID: 328853378}
- component: {fileID: 328853376}
- component: {fileID: 328853375}
- component: {fileID: 328853374}
m_Layer: 0
m_Name: Camera
m_TagString: MainCamera
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!114 &328853374
MonoBehaviour:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 328853373}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 70ff706d2c89cc247a850af95597fcbb, type: 3}
m_Name:
m_EditorClassIdentifier:
targetPosition: {x: 0, y: 0, z: 0}
distance: 5
xSpeed: 120
ySpeed: 120
zoomSpeed: 0.8
yMinLimit: -80
yMaxLimit: 80
distanceMin: 0.05
distanceMax: 500
--- !u!81 &328853375
AudioListener:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 8100000, guid: 49a0e923d39ec3c4c8bb97699e2f2903,
type: 2}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 328853373}
m_Enabled: 1
--- !u!124 &328853376
Behaviour:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 12400000, guid: 49a0e923d39ec3c4c8bb97699e2f2903,
type: 2}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 328853373}
m_Enabled: 1
--- !u!20 &328853378
Camera:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 2000000, guid: 49a0e923d39ec3c4c8bb97699e2f2903,
type: 2}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 328853373}
m_Enabled: 1
serializedVersion: 2
m_ClearFlags: 1
m_BackGroundColor: {r: 0.62552905, g: 0.684092, b: 0.7761194, a: 0.019607844}
m_NormalizedViewPortRect:
serializedVersion: 2
x: 0
y: 0
width: 1
height: 1
near clip plane: 0.02
far clip plane: 1000
field of view: 60
orthographic: 0
orthographic size: 100
m_Depth: -1
m_CullingMask:
serializedVersion: 2
m_Bits: 4294967295
m_RenderingPath: -1
m_TargetTexture: {fileID: 0}
m_TargetDisplay: 0
m_TargetEye: 3
m_HDR: 0
m_AllowMSAA: 1
m_AllowDynamicResolution: 0
m_ForceIntoRT: 0
m_OcclusionCulling: 1
m_StereoConvergence: 10
m_StereoSeparation: 0.022
--- !u!4 &328853379
Transform:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 400002, guid: 49a0e923d39ec3c4c8bb97699e2f2903, type: 2}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 328853373}
m_LocalRotation: {x: -0, y: 1, z: -0, w: -0.000000063325004}
m_LocalPosition: {x: 0, y: 0, z: 2}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: []
m_Father: {fileID: 0}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1 &979359784
GameObject:
m_ObjectHideFlags: 0
Expand Down Expand Up @@ -341,7 +218,7 @@ Transform:
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: []
m_Father: {fileID: 0}
m_RootOrder: 4
m_RootOrder: 2
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1 &1013584300
GameObject:
Expand Down Expand Up @@ -371,7 +248,7 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: df99c459245b3cd40be06aca24a19170, type: 3}
m_Name:
m_EditorClassIdentifier:
loader: {fileID: 10002067}
loader: {fileID: 0}
pathRoot: http://localhost:8080/glTF-Sample-Models/2.0/
manifestRelativePath: model-index.json
modelRelativePath:
Expand All @@ -387,7 +264,7 @@ Transform:
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: []
m_Father: {fileID: 0}
m_RootOrder: 5
m_RootOrder: 3
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!114 &1013584303
MonoBehaviour:
Expand All @@ -400,76 +277,11 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: df99c459245b3cd40be06aca24a19170, type: 3}
m_Name:
m_EditorClassIdentifier:
loader: {fileID: 10002067}
loader: {fileID: 0}
pathRoot: http://localhost:8080/glTF-Asset-Generator/Output/Positive/
manifestRelativePath: Manifest.json
modelRelativePath:
loadThisFrame: 0
--- !u!1 &1667736112
GameObject:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
serializedVersion: 5
m_Component:
- component: {fileID: 1667736114}
- component: {fileID: 1667736113}
m_Layer: 0
m_Name: Light
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!108 &1667736113
Light:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 1667736112}
m_Enabled: 1
serializedVersion: 8
m_Type: 1
m_Color: {r: 1, g: 0.95686275, b: 0.8392157, a: 1}
m_Intensity: 1.3
m_Range: 10
m_SpotAngle: 30
m_CookieSize: 10
m_Shadows:
m_Type: 2
m_Resolution: -1
m_CustomResolution: -1
m_Strength: 1
m_Bias: 0.05
m_NormalBias: 0.4
m_NearPlane: 0.2
m_Cookie: {fileID: 0}
m_DrawHalo: 0
m_Flare: {fileID: 0}
m_RenderMode: 0
m_CullingMask:
serializedVersion: 2
m_Bits: 4294967295
m_Lightmapping: 4
m_AreaSize: {x: 1, y: 1}
m_BounceIntensity: 1
m_ColorTemperature: 6570
m_UseColorTemperature: 0
m_ShadowRadius: 0
m_ShadowAngle: 0
--- !u!4 &1667736114
Transform:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 1667736112}
m_LocalRotation: {x: 0.048932634, y: 0.9485057, z: -0.18261904, w: 0.2541514}
m_LocalPosition: {x: 3.56, y: 5.64, z: 6.41}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: []
m_Father: {fileID: 0}
m_RootOrder: 2
m_LocalEulerAnglesHint: {x: 21.796001, y: 150, z: 0}
--- !u!1 &1904599574
GameObject:
m_ObjectHideFlags: 0
Expand All @@ -487,7 +299,7 @@ GameObject:
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
m_IsActive: 0
--- !u!23 &1904599575
MeshRenderer:
m_ObjectHideFlags: 0
Expand Down Expand Up @@ -554,5 +366,5 @@ Transform:
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: []
m_Father: {fileID: 0}
m_RootOrder: 1
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
2 changes: 1 addition & 1 deletion UnityGLTF/Assets/UnityGLTF/Editor/Scripts/GLTFImporter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -336,7 +336,7 @@ private GameObject CreateGLTFScene(string projectFilePath)
{
var importOptions = new ImportOptions
{
ExternalDataLoader = new FileLoader(Path.GetDirectoryName(projectFilePath)),
DataLoader = new FileLoader(Path.GetDirectoryName(projectFilePath)),
};
using (var stream = File.OpenRead(projectFilePath))
{
Expand Down