Have viewtypes changed since early 2021?

JohnG

Member
Hi,

I created a new view type early on this year (for 3rd person sniper zoom), it is now significantly broken since the latest upgrade. I am 99% sure I used the adventure view type as a base for my new view type, however I can no longer find this code. I am finding code called AdventureInspectorDrawer, I am not sure if this has replaced the way viewtypes work?

The original concept was from this thread I created - http://www.opsive.com/forum/index.php?threads/howto-get-this-1st-person-scope-view-in-3rd.4696/

@Justin liked the idea, but I don't think it has been implemented as a standard view type/option.
 
Even the example code on the view types documentation doesn't work (cut and paste):

 
Depends on what version you were using before. You may want to check the UCC patch notes for any versions you've updated here: https://opsive.com/news/category/release-notes/ultimate-character-controller-release-notes/ However there haven't been any major changes to ViewTypes in recent patches at all. To my knowledge the stuff that was suggested in the other thread you linked hasn't been added yet. AdventureInspectorDrawer is still there. What's the issue that you're having now?
 
Nevermind @Andrew I found the opsive code, the name didn't change, I was just searching for thirdpersonview instead of camera/viewtypes/thirdperson. I will study the code to see if there are any changes between version.

My original view was was basically the same as combat view with a few changes in order to do the scope view that I wanted. I should be able to fix it now that I found the code to compare it to.

Thx.
 
@Andrew There is actually something you can help with...

Code:
        var viewTypeName = "Opsive.UltimateCharacterController.ThirdPersonController.Camera.ViewTypes.Combat";
        cameraController.SetViewType(UnityEngineUtility.GetType(viewTypeName), false);

The above code is not working, its complaining about UnityEngineUtility.GetType. The issue is Method 'GetType' has 0 parameter(s) but is invoked with 1 argument(s). I don't really understand this, I am just copying the code from the viewtypes example on the opsive documentation (3 posts above). I can see that its a unity issue/change, however that doesn't help me when I am using the opsive documentation as an example.

Also mentioned and responded to in this thread (https://www.opsive.com/forum/index.php?threads/changing-state-by-code.5422/) however no solution provided, @Justin said the documentation would be updated.
 
Last edited:
I updated the camera documentation. FindCamera is now under Opsive.Shared.Camera.CameraUtility. Thanks for letting me know. The docs for changing the state are correct (on the website, we haven't released a new version to update the pdf yet).
 
Top