-
Notifications
You must be signed in to change notification settings - Fork 41
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
Added feature to help resolve mocks based off same type search. #417
Added feature to help resolve mocks based off same type search. #417
Conversation
…ially useful for Mesh mocking. * Accepts new mock format JVLmock_PrefabName__ChildName. * Finds an object that matches the type of the mock from the specified child of the prefab in the new format. * Cleans name of any object Mesh with " Instance" on the end of the name for finding mock replacement.
Thanks, it looks really good. Especially using the While testing with the With more complex matching, the warnings should also be more specific. For example, if a child wasn't found should print a different warning than if the type on the child wasn't found. If you don't want to worry about this, I can also do this later. There are a few minor comments I will make on the code but this won't be a blocker. |
Current minor suggestions have been implemented. I will look into making the pathing more dynamic to accept more nesting for cases like: JVLmock_VikingShip__ship__mast and work on better error logging for that case. |
* Supports format JVLMock_PrefabName__ChildName__ChildName2__ChildName3 etc * Improved name cleaning calls for GetRealPrefabFromMock * Added new field to MockResolveException for children path
Testing this on my current mocked locations the startup time is significantly slower than my stand alone solution which had caching. Next improvement will be to add in the ability to cache all instances with the longer path finding names after finding them once. |
Since there are many unnamed Mesh objects used the current mocking system can not replace them. This is the required changes to get a functioning mesh mocking system, but should work for other types too.
Examples of usage: