227 reputation
211
bio website
location
age
visits member for 2 years
seen 21 hours ago

Jan
12
comment Trying to access another class that is outside my Unity script but casting is failing
I'm still getting a warning that I am hiding an inherited member 'UnityEngine.Component.camera' if I go with this approach though.
Jan
12
comment Trying to access another class that is outside my Unity script but casting is failing
Ah, I see. That's what has been confusing me. Thank you.
Jan
12
comment Trying to access another class that is outside my Unity script but casting is failing
Debug.Log(GetComponent(typeof(FlyThroughCamera))) returns null
Jan
12
comment Trying to access another class that is outside my Unity script but casting is failing
I have added a screenshot as requested.
Jan
12
revised Trying to access another class that is outside my Unity script but casting is failing
added 89 characters in body
Jan
12
comment Trying to access another class that is outside my Unity script but casting is failing
GetComponent still returns null, even though the class exists and is linked via the Inspector window.
Jan
12
comment Trying to access another class that is outside my Unity script but casting is failing
I have added the FlyThroughCamera on my GameObject in the inspector but the cast will revert it to null. If I delete the cast code then I will get a warning about hiding inherited members because it is not instantiated in any way.
Jan
12
asked Trying to access another class that is outside my Unity script but casting is failing
Jan
11
accepted My method for switching between cameras in Unity does not change the main camera
Jan
11
comment My method for switching between cameras in Unity does not change the main camera
Good thinking. How would I find all cameras in the scene regardless of their activity?
Jan
11
asked My method for switching between cameras in Unity does not change the main camera
Sep
23
accepted Drawing transparent and opaque 3D objects. How do I preventing z-fighting?
Sep
19
comment Drawing transparent and opaque 3D objects. How do I preventing z-fighting?
Near clip is currently 0.1f and the far clip is 1000f. I was thinking that should be precise enough?
Sep
18
comment Drawing transparent and opaque 3D objects. How do I preventing z-fighting?
Yes, they are designed to be coplanar. I'm using a 24-bit depth buffer for greater precision also. It looks like adjusting the screen space depth is the best option. The DepthBias option doesn't provide consistent results and can cause some strange clipping issues within the view frustum.
Sep
17
revised Drawing transparent and opaque 3D objects. How do I preventing z-fighting?
added 114 characters in body
Sep
17
revised Drawing transparent and opaque 3D objects. How do I preventing z-fighting?
added 173 characters in body
Sep
17
comment Drawing transparent and opaque 3D objects. How do I preventing z-fighting?
The depth compare function is already "less than or equal to". I've added a third edit to give the exact state. Is there something else that requires changing?
Sep
17
answered Drawing transparent and opaque 3D objects. How do I preventing z-fighting?
Sep
16
comment Drawing transparent and opaque 3D objects. How do I preventing z-fighting?
I have. I've also added an edit as to why I don't believe this is a viable solution. Do you agree?
Sep
16
revised Drawing transparent and opaque 3D objects. How do I preventing z-fighting?
added 219 characters in body