- Home /
Question by
ForWhatItsWorth · Aug 06, 2021 at 07:36 PM ·
script.inheritancereferencing
Modifying/Referencing (Inherited?) Variables within Cinemachine VirtualCamera?
I've been trying to modify the "CameraCollisionFilter" variable in the CinemachineVirtualCamera component through another script, but I can't seem to find any way on how to access it.
GetComponent<Cinemachine.CinemachineVirtualCamera>().CameraCollisionFilter
^Doesn't recognize CameraCollisionFilter
as a variable.
^ Does see
GetComponent<Cinemachine.Cinemachine3rdPersonFollow>().CameraCollisionFilter
CameraCollisionFilter
as a variable, but the GameObject doesn't recognize
3rdPersonFollow
as a valid component. Even when entering debug mode in the inspector for the GameObject, the entire "Body" section (holding the CameraCollisionFilter variable) dissapears. I don't know if it has anything to do with the nature of the Inheritance within the Cinemachine class. My knowledge on Unity inheritance is pretty weak.
Would anyone know a way to access this information?
cinemachine-inspector.png
(42.8 kB)
Comment
Your answer
![](https://koobas.hobune.stream/wayback/20220613041316im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
GameObject references runtime script in scene file. Unsure whats wrong 2 Answers
How to attach game objects to scripts via scripting? 3 Answers
Help with adding variables to other script 2 Answers
Inheritance in unity editor question 1 Answer
An OS design issue: File types associated with their appropriate programs 1 Answer