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

Conversation

mhochk
Copy link
Contributor

@mhochk mhochk commented Dec 16, 2019

  • Updated the build definition to build the Unity code and run the tests, but not produce or publish a unity package (which requires a Pro/Plus license).
  • Moving the Unity tests in the direction of comparing against the images already maintained with the models. Could not completely switch to this yet though due to some discovered render issues to be addressed in independent changes.
  • Fixed a race condition in loading multiple images in a single model by reworking the ILoader interface.
  • Unified the test scenes/prefabs so that the Main scene fully leverages the TestScenePrefab and the TestScene is no longer relevant.

@AdamMitchell-ms
Copy link
Contributor

AdamMitchell-ms commented Dec 16, 2019

You shouldn't check in all of the ACTUAL and EXPECTED images from the tests. #Resolved

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)

@mhochk
Copy link
Contributor Author

mhochk commented Dec 16, 2019

And I would love to get rid of them both, but the changes needed to do that are getting larger than I want to try including in this change. The plan is to get rid of the EXPECTED images in favor of the ones already included with the models, but there is at least 1 shader bug that still needs to get tracked down and fixed before that can happen. At that point we can debate out if the ACTUALs should be checked in, or just compared at runtime. (I'm in favor of the later, but not going to fight much if there are differing opinions).


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

@@ -524,9 +538,10 @@ protected IEnumerator WaitUntilEnum(WaitUntil waitUntil)
private async Task LoadJson(string jsonFilePath)
{
#if !WINDOWS_UWP
if (IsMultithreaded && _options.ExternalDataLoader.HasSyncLoadMethod)
var dataLoader2 = _options.DataLoader as IDataLoader2;
if (IsMultithreaded && dataLoader2 != null)
Copy link
Contributor

@AdamMitchell-ms AdamMitchell-ms Dec 17, 2019

Choose a reason for hiding this comment

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

dataLoader2 != null [](start = 26, length = 19)

If this targets a new enough version of .NET, you can use this syntax:

_options.DataLoader is IDataLoader2 dataLoader2 #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.

Not a new enough version of .NET yet (sadly)


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

@@ -535,10 +550,9 @@ private async Task LoadJson(string jsonFilePath)
#endif
{
// HACK: Force the coroutine to run synchronously in the editor
await _options.ExternalDataLoader.LoadStream(jsonFilePath);
_gltfStream.Stream = await _options.DataLoader.LoadStreamAsync(jsonFilePath);
Copy link
Contributor

@AdamMitchell-ms AdamMitchell-ms Dec 17, 2019

Choose a reason for hiding this comment

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

Remove this line or update it to something else. #Resolved

@@ -22,18 +22,16 @@ public class RootMergeComponent : MonoBehaviour
private async Task Start()
{
var fullPath0 = Application.streamingAssetsPath + Path.DirectorySeparatorChar + asset0Path;
ILoader loader0 = new FileLoader(URIHelper.GetDirectoryName(fullPath0));
IDataLoader2 loader0 = new FileLoader(URIHelper.GetDirectoryName(fullPath0));
Copy link
Contributor

@AdamMitchell-ms AdamMitchell-ms Dec 17, 2019

Choose a reason for hiding this comment

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

IDataLoader2 [](start = 3, length = 12)

nit: I think both of these loaders can just be IDataLoader (not IDataLoader2) #Resolved

…ough it means none of the tests are actually running in the lab
@mhochk mhochk merged commit fbb55fd into master Dec 17, 2019
@mhochk mhochk deleted the u/hoch/automated_build branch December 17, 2019 20:43
@mhochk mhochk mentioned this pull request Dec 18, 2019
github-actions bot pushed a commit to Rhinox-Training/UnityGLTF that referenced this pull request Nov 9, 2022
* Updated the build definition to build the Unity code and run the tests, but not produce or publish a unity package (which requires a Pro/Plus license).  Also does not include running the tests that rely on graphics (which is currently all of them).
* Moving the Unity tests in the direction of comparing against the images already maintained with the models. Could not completely switch to this yet though due to some discovered render issues to be addressed in independent changes.
* Fixed a race condition in loading multiple images in a single model by reworking the ILoader interface.
* Unified the test scenes/prefabs so that the Main scene fully leverages the TestScenePrefab and the TestScene is no longer relevant.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants