-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
Allowing default versus overriden controller models #1206
Allowing default versus overriden controller models #1206
Conversation
… AlwaysUseAlternateModel boolean to allow you to specify a default if the models aren't found/loaded or specify a model that should always be used.
Fixing build break for UWP builds.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks good! I haven't gotten a chance to test it yet, but here are some smaller comments I have so far.
@@ -186,6 +186,7 @@ void Update() | |||
{ | |||
if (Application.isEditor) | |||
{ | |||
#if UNITY_EDITOR |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this needed? The if (Application.isEditor)
call above should prevent this from being called outside the Editor.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No, because we're calling on the UnityEditor
namespace on the line below.
objectReference: {fileID: 0} | ||
- target: {fileID: 114710303647202208, guid: d29bc40b7f3df26479d6a0aac211c355, | ||
type: 2} | ||
propertyPath: AlwaysUseAlternateModel |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think there might be some stale references in here, if you could re-save the scene and update it please, that'd be great!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm, yeah it doesn't look like Unity is removing the old stuff. Cleaning up now.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks fine to me.
@keveleigh did you get a chance to look over this again? Thoughts? |
@StephenHodgson I'll be taking a look today! I definitely think this is a needed change, and I think it works well with the in-editor controller models. |
#else | ||
yield break; | ||
yield break; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should also have LoadAlternateControllerModel(source);
right before the yield break;
, that way the alternate models will load in the editor if needed. Right now, nothing will load in the editor.
Cool! I'm going to approve this as-is, then I'll merge it into master and update it with my new in-editor code. |
Fix for issue #1174 to allow for default models if the OS's models weren't loaded in addition to allowing for overriding the models.