Search Unity

`PostProcessVolume' could not be found Error

Discussion in 'Cinemachine' started by syntheticperson, May 6, 2018.

  1. syntheticperson

    syntheticperson

    Joined:
    May 6, 2018
    Posts:
    5
    I'm using unity 2018.2.0b1
    When I tried downloading cinemachine from the Asset store, I get this error:

    Assets/Cinemachine/PostFX/CinemachinePostProcessing.cs(161,21): error CS0246: The type or namespace name `PostProcessVolume' could not be found. Are you missing an assembly reference?

    What am I missing?

    thanks
     
  2. Gregoryl

    Gregoryl

    Unity Technologies

    Joined:
    Dec 22, 2016
    Posts:
    7,728
    You should use the latest Cinemachine, from the Package Manager.
    Delete the Cinemachine asset that you got from the asset store.
    Then, open the package manager (Windows/Package Manager) and import CM 2.1.12 from there.
     
    GamerSuji likes this.
  3. trabulsiahmad17

    trabulsiahmad17

    Joined:
    Apr 5, 2020
    Posts:
    1
    Hi :) How can you Delete the Cinemachine asset that you got from the asset store???
     
  4. Samarth05

    Samarth05

    Joined:
    Mar 30, 2020
    Posts:
    3
    Now cinemachine is not available to download so what can I do.
    I am facing these errors
    PostProcessVolume
    PostProcessProfile
    PostProcessLayer
     
  5. Gregoryl

    Gregoryl

    Unity Technologies

    Joined:
    Dec 22, 2016
    Posts:
    7,728
    Just delete the folder from you assets. Also be sure to delete the CinemachinePostProcessing and CinnemacineExamples folders, if you have them.
     
  6. Gregoryl

    Gregoryl

    Unity Technologies

    Joined:
    Dec 22, 2016
    Posts:
    7,728
    Cinemachine is available from the Package Manager.
    Can you be a little more specific about the errors? It would help to copy/paste them in full from the Unity Console window.
     
  7. Samarth05

    Samarth05

    Joined:
    Mar 30, 2020
    Posts:
    3
    @Gregoryl I am facing these errors in using 3d game kit.
    I searched for errors and how to solve them but still I am getting errors.
    Type or namespace name 'cinemachine' could not be found.
    And similarly of postprocessing.
    Thanks
     
  8. Gregoryl

    Gregoryl

    Unity Technologies

    Joined:
    Dec 22, 2016
    Posts:
    7,728
    Are Cinemachine and PostProcessing packages installed? Open the package manager and see if they are present.

    upload_2020-4-9_11-18-17.png

    upload_2020-4-9_11-18-52.png
     
  9. Drahedron

    Drahedron

    Joined:
    Apr 17, 2020
    Posts:
    20
    Hi @Gregoryl,

    I am new at Unity so I don't have this Package Manager.

    Also, since I've bought a course that uses Unity 2017 I decided to download the version Unity 2017.3.0f3 (64-bit) so I would not find any surprises.

    The problem is that now I can't find a version of Cinemachine that works in my Unity version and have a Cinemachine 2D Camera (which is used on the course) can you help me?

    I've found this google drive link with severel Cinemachine archives but when I import them they don't have a Cinemachine 2D Camera.

    https://drive.google.com/drive/u/0/folders/0BwhlqkMsERx4TDJNaVpQUmlzejQ

    Sorry if my english was not correct, I would appreciate your help.
     
  10. Gregoryl

    Gregoryl

    Unity Technologies

    Joined:
    Dec 22, 2016
    Posts:
    7,728
    Yes, the Asset Store version of Cinemachine is deprecated since we no longer support Unity 2017.

    Are you sure that upgrading Unity - at least to 2018.4, which we still support - is not an option for your course? I would recommend at least trying that, and then we will be able to support you. That version has a package manager, and you will be able to get Cinemachine from there.
     
  11. Drahedron

    Drahedron

    Joined:
    Apr 17, 2020
    Posts:
    20
    @Gregoryl Thanks a lot for your answer.

    In the beggining I tried to use the newest version, but since I had no programming knowledge it took me hours to find out this version had no support for Monobehavior (used in the course). For some reason my code was not working on MS Studio so I decided to download exactly the same version of the course, also I've found out that Monobehavior was already included in that version. So my problem with the new versions is that I can't use Monobehavior, but I will try to download a new version and see if it works.

    Again, thanks a lot for your answer!
     
  12. DeansTV

    DeansTV

    Joined:
    Jul 14, 2020
    Posts:
    2
    Ive got an Error and it says this
    Library\PackageCache\com.unity.postprocessing@2.0.3-preview\PostProcessing\Runtime\Utils\RuntimeUtilities.cs(356,42): error CS0246: The type or namespace name 'PostProcessVolume' could not be found (are you missing a using directive or an assembly reference?)

    I couldnt Find out what the Problem is here is the Script as well


    using System;
    using System.Collections.Generic;
    using System.Linq;
    using System.Linq.Expressions;
    using System.Reflection;
    using System.Text;
    using UnityEngine.Assertions;

    #if UNITY_EDITOR
    using UnityEditor;
    #endif

    namespace UnityEngine.Rendering.PostProcessing
    {
    using SceneManagement;
    using UnityObject = UnityEngine.Object;

    public static class RuntimeUtilities
    {
    #region Textures

    static Texture2D m_WhiteTexture;
    public static Texture2D whiteTexture
    {
    get
    {
    if (m_WhiteTexture == null)
    {
    m_WhiteTexture = new Texture2D(1, 1, TextureFormat.ARGB32, false);
    m_WhiteTexture.SetPixel(0, 0, Color.white);
    m_WhiteTexture.Apply();
    }

    return m_WhiteTexture;
    }
    }

    static Texture2D m_BlackTexture;
    public static Texture2D blackTexture
    {
    get
    {
    if (m_BlackTexture == null)
    {
    m_BlackTexture = new Texture2D(1, 1, TextureFormat.ARGB32, false);
    m_BlackTexture.SetPixel(0, 0, Color.black);
    m_BlackTexture.Apply();
    }

    return m_BlackTexture;
    }
    }

    static Texture2D m_TransparentTexture;
    public static Texture2D transparentTexture
    {
    get
    {
    if (m_TransparentTexture == null)
    {
    m_TransparentTexture = new Texture2D(1, 1, TextureFormat.ARGB32, false);
    m_TransparentTexture.SetPixel(0, 0, Color.clear);
    m_TransparentTexture.Apply();
    }

    return m_TransparentTexture;
    }
    }

    #endregion

    #region Rendering

    static Mesh s_FullscreenTriangle;
    public static Mesh fullscreenTriangle
    {
    get
    {
    if (s_FullscreenTriangle != null)
    return s_FullscreenTriangle;

    s_FullscreenTriangle = new Mesh { name = "Fullscreen Triangle" };

    // Because we have to support older platforms (GLES2/3, DX9 etc) we can't do all of
    // this directly in the vertex shader using vertex ids :(
    s_FullscreenTriangle.SetVertices(new List<Vector3>
    {
    new Vector3(-1f, -1f, 0f),
    new Vector3(-1f, 3f, 0f),
    new Vector3( 3f, -1f, 0f)
    });
    s_FullscreenTriangle.SetIndices(new [] { 0, 1, 2 }, MeshTopology.Triangles, 0, false);
    s_FullscreenTriangle.UploadMeshData(false);

    return s_FullscreenTriangle;
    }
    }

    static Material s_CopyStdMaterial;
    public static Material copyStdMaterial
    {
    get
    {
    if (s_CopyStdMaterial != null)
    return s_CopyStdMaterial;

    var shader = Shader.Find("Hidden/PostProcessing/CopyStd");
    s_CopyStdMaterial = new Material(shader)
    {
    name = "PostProcess - CopyStd",
    hideFlags = HideFlags.HideAndDontSave
    };

    return s_CopyStdMaterial;
    }
    }

    static Material s_CopyMaterial;
    public static Material copyMaterial
    {
    get
    {
    if (s_CopyMaterial != null)
    return s_CopyMaterial;

    var shader = Shader.Find("Hidden/PostProcessing/Copy");
    s_CopyMaterial = new Material(shader)
    {
    name = "PostProcess - Copy",
    hideFlags = HideFlags.HideAndDontSave
    };

    return s_CopyMaterial;
    }
    }

    static PropertySheet s_CopySheet;
    public static PropertySheet copySheet
    {
    get
    {
    if (s_CopySheet == null)
    s_CopySheet = new PropertySheet(copyMaterial);

    return s_CopySheet;
    }
    }

    // Use a custom blit method to draw a fullscreen triangle instead of a fullscreen quad
    // https://michaldrobot.com/2014/04/01/gcn-execution-patterns-in-full-screen-passes/
    public static void BlitFullscreenTriangle(this CommandBuffer cmd, RenderTargetIdentifier source, RenderTargetIdentifier destination, bool clear = false)
    {
    cmd.SetGlobalTexture(ShaderIDs.MainTex, source);
    cmd.SetRenderTarget(destination);

    if (clear)
    cmd.ClearRenderTarget(true, true, Color.clear);

    cmd.DrawMesh(fullscreenTriangle, Matrix4x4.identity, copyMaterial, 0, 0);
    }

    public static void BlitFullscreenTriangle(this CommandBuffer cmd, RenderTargetIdentifier source, RenderTargetIdentifier destination, PropertySheet propertySheet, int pass, bool clear = false)
    {
    cmd.SetGlobalTexture(ShaderIDs.MainTex, source);
    cmd.SetRenderTarget(destination);

    if (clear)
    cmd.ClearRenderTarget(true, true, Color.clear);

    cmd.DrawMesh(fullscreenTriangle, Matrix4x4.identity, propertySheet.material, 0, pass, propertySheet.properties);
    }

    public static void BlitFullscreenTriangle(this CommandBuffer cmd, RenderTargetIdentifier source, RenderTargetIdentifier destination, RenderTargetIdentifier depth, PropertySheet propertySheet, int pass, bool clear = false)
    {
    cmd.SetGlobalTexture(ShaderIDs.MainTex, source);
    cmd.SetRenderTarget(destination, depth);

    if (clear)
    cmd.ClearRenderTarget(true, true, Color.clear);

    cmd.DrawMesh(fullscreenTriangle, Matrix4x4.identity, propertySheet.material, 0, pass, propertySheet.properties);
    }

    public static void BlitFullscreenTriangle(this CommandBuffer cmd, RenderTargetIdentifier source, RenderTargetIdentifier[] destinations, RenderTargetIdentifier depth, PropertySheet propertySheet, int pass, bool clear = false)
    {
    cmd.SetGlobalTexture(ShaderIDs.MainTex, source);
    cmd.SetRenderTarget(destinations, depth);

    if (clear)
    cmd.ClearRenderTarget(true, true, Color.clear);

    cmd.DrawMesh(fullscreenTriangle, Matrix4x4.identity, propertySheet.material, 0, pass, propertySheet.properties);
    }

    public static void BlitFullscreenTriangle(Texture source, RenderTexture destination, Material material, int pass)
    {
    var oldRt = RenderTexture.active;

    material.SetPass(pass);
    if (source != null)
    material.SetTexture(ShaderIDs.MainTex, source);

    Graphics.SetRenderTarget(destination);
    Graphics.DrawMeshNow(fullscreenTriangle, Matrix4x4.identity);
    RenderTexture.active = oldRt;
    }

    // Fast basic copy texture if available, falls back to blit copy if not
    // Assumes that both textures have the exact same type and format
    public static void CopyTexture(CommandBuffer cmd, RenderTargetIdentifier source, RenderTargetIdentifier destination)
    {
    if (SystemInfo.copyTextureSupport > CopyTextureSupport.None)
    {
    cmd.CopyTexture(source, destination);
    return;
    }

    cmd.BlitFullscreenTriangle(source, destination);
    }

    // TODO: Generalize the GetTemporaryRT and Blit commands in order to support
    // RT Arrays for Stereo Instancing/MultiView

    #endregion

    #region Unity specifics & misc methods

    public static bool scriptableRenderPipelineActive
    {
    get { return GraphicsSettings.renderPipelineAsset != null; } // 5.6+ only
    }

    public static bool supportsDeferredShading
    {
    get { return scriptableRenderPipelineActive || GraphicsSettings.GetShaderMode(BuiltinShaderType.DeferredShading) != BuiltinShaderMode.Disabled; }
    }

    public static bool supportsDepthNormals
    {
    get { return scriptableRenderPipelineActive || GraphicsSettings.GetShaderMode(BuiltinShaderType.DepthNormals) != BuiltinShaderMode.Disabled; }
    }

    #if UNITY_EDITOR
    public static bool isSinglePassStereoSelected
    {
    get
    {
    return UnityEditor.PlayerSettings.virtualRealitySupported
    && UnityEditor.PlayerSettings.stereoRenderingPath == UnityEditor.StereoRenderingPath.SinglePass;
    }
    }
    #endif

    // TODO: Check for SPSR support at runtime
    public static bool isSinglePassStereoEnabled
    {
    get
    {
    #if UNITY_EDITOR
    return isSinglePassStereoSelected && Application.isPlaying;
    #elif UNITY_2017_2_OR_NEWER
    return UnityEngine.XR.XRSettings.eyeTextureDesc.vrUsage == VRTextureUsage.TwoEyes;
    #else
    return false;
    #endif
    }
    }

    public static bool isVREnabled
    {
    get
    {
    #if UNITY_EDITOR
    return UnityEditor.PlayerSettings.virtualRealitySupported;
    #elif UNITY_XBOXONE
    return false;
    #elif UNITY_2017_2_OR_NEWER
    return UnityEngine.XR.XRSettings.enabled;
    #elif UNITY_5_6_OR_NEWER
    return UnityEngine.VR.VRSettings.enabled;
    #endif
    }
    }

    public static bool isAndroidOpenGL
    {
    get { return Application.platform == RuntimePlatform.Android && SystemInfo.graphicsDeviceType != GraphicsDeviceType.Vulkan; }
    }

    public static RenderTextureFormat defaultHDRRenderTextureFormat
    {
    get
    {
    #if UNITY_ANDROID || UNITY_IPHONE || UNITY_TVOS || UNITY_SWITCH || UNITY_EDITOR
    RenderTextureFormat format = RenderTextureFormat.RGB111110Float;
    # if UNITY_EDITOR
    var target = EditorUserBuildSettings.activeBuildTarget;
    if (target != BuildTarget.Android && target != BuildTarget.iOS && target != BuildTarget.tvOS && target != BuildTarget.Switch)
    return RenderTextureFormat.DefaultHDR;
    # endif // UNITY_EDITOR
    if (format.IsSupported())
    return format;
    #endif // UNITY_ANDROID || UNITY_IPHONE || UNITY_TVOS || UNITY_SWITCH || UNITY_EDITOR
    return RenderTextureFormat.DefaultHDR;
    }
    }

    public static bool isFloatingPointFormat(RenderTextureFormat format)
    {
    return format == RenderTextureFormat.DefaultHDR || format == RenderTextureFormat.ARGBHalf || format == RenderTextureFormat.ARGBFloat ||
    format == RenderTextureFormat.RGFloat || format == RenderTextureFormat.RGHalf ||
    format == RenderTextureFormat.RFloat || format == RenderTextureFormat.RHalf ||
    format == RenderTextureFormat.RGB111110Float;
    }

    public static void Destroy(UnityObject obj)
    {
    if (obj != null)
    {
    #if UNITY_EDITOR
    if (Application.isPlaying)
    UnityObject.Destroy(obj);
    else
    UnityObject.DestroyImmediate(obj);
    #else
    UnityObject.Destroy(obj);
    #endif
    }
    }

    public static bool isLinearColorSpace
    {
    get { return QualitySettings.activeColorSpace == ColorSpace.Linear; }
    }

    public static bool IsResolvedDepthAvailable(Camera camera)
    {
    // AFAIK resolved depth is only available on D3D11/12 via BuiltinRenderTextureType.ResolvedDepth
    // TODO: Is there more proper way to determine this? What about SRPs?
    var gtype = SystemInfo.graphicsDeviceType;
    return camera.actualRenderingPath == RenderingPath.DeferredShading &&
    (gtype == GraphicsDeviceType.Direct3D11 || gtype == GraphicsDeviceType.Direct3D12 || gtype == GraphicsDeviceType.XboxOne);
    }

    public static void DestroyProfile(PostProcessProfile profile, bool destroyEffects)
    {
    if (destroyEffects)
    {
    foreach (var effect in profile.settings)
    Destroy(effect);
    }

    Destroy(profile);
    }

    public static void DestroyVolume(PostProcessVolume volume, bool destroySharedProfile)
    {
    if (destroySharedProfile)
    DestroyProfile(volume.sharedProfile, true);

    Destroy(volume);
    }

    // Returns ALL scene objects in the hierarchy, included inactive objects
    // Beware, this method will be slow for big scenes
    public static IEnumerable<T> GetAllSceneObjects<T>()
    where T : Component
    {
    var queue = new Queue<Transform>();
    var roots = SceneManager.GetActiveScene().GetRootGameObjects();

    foreach (var root in roots)
    {
    queue.Enqueue(root.transform);
    var comp = root.GetComponent<T>();

    if (comp != null)
    yield return comp;
    }

    while (queue.Count > 0)
    {
    foreach (Transform child in queue.Dequeue())
    {
    queue.Enqueue(child);
    var comp = child.GetComponent<T>();

    if (comp != null)
    yield return comp;
    }
    }
    }

    public static void CreateIfNull<T>(ref T obj)
    where T : class, new()
    {
    if (obj == null)
    obj = new T();
    }

    #endregion

    #region Maths

    public static float Exp2(float x)
    {
    return Mathf.Exp(x * 0.69314718055994530941723212145818f);
    }

    // Adapted heavily from PlayDead's TAA code
    // https://github.com/playdeadgames/temporal/blob/master/Assets/Scripts/Extensions.cs
    public static Matrix4x4 GetJitteredPerspectiveProjectionMatrix(Camera camera, Vector2 offset)
    {
    float vertical = Mathf.Tan(0.5f * Mathf.Deg2Rad * camera.fieldOfView);
    float horizontal = vertical * camera.aspect;
    float near = camera.nearClipPlane;
    float far = camera.farClipPlane;

    offset.x *= horizontal / (0.5f * camera.pixelWidth);
    offset.y *= vertical / (0.5f * camera.pixelHeight);

    float left = (offset.x - horizontal) * near;
    float right = (offset.x + horizontal) * near;
    float top = (offset.y + vertical) * near;
    float bottom = (offset.y - vertical) * near;

    var matrix = new Matrix4x4();

    matrix[0, 0] = (2f * near) / (right - left);
    matrix[0, 1] = 0f;
    matrix[0, 2] = (right + left) / (right - left);
    matrix[0, 3] = 0f;

    matrix[1, 0] = 0f;
    matrix[1, 1] = (2f * near) / (top - bottom);
    matrix[1, 2] = (top + bottom) / (top - bottom);
    matrix[1, 3] = 0f;

    matrix[2, 0] = 0f;
    matrix[2, 1] = 0f;
    matrix[2, 2] = -(far + near) / (far - near);
    matrix[2, 3] = -(2f * far * near) / (far - near);

    matrix[3, 0] = 0f;
    matrix[3, 1] = 0f;
    matrix[3, 2] = -1f;
    matrix[3, 3] = 0f;

    return matrix;
    }

    public static Matrix4x4 GetJitteredOrthographicProjectionMatrix(Camera camera, Vector2 offset)
    {
    float vertical = camera.orthographicSize;
    float horizontal = vertical * camera.aspect;

    offset.x *= horizontal / (0.5f * camera.pixelWidth);
    offset.y *= vertical / (0.5f * camera.pixelHeight);

    float left = offset.x - horizontal;
    float right = offset.x + horizontal;
    float top = offset.y + vertical;
    float bottom = offset.y - vertical;

    return Matrix4x4.Ortho(left, right, bottom, top, camera.nearClipPlane, camera.farClipPlane);
    }

    public static Matrix4x4 GenerateJitteredProjectionMatrixFromOriginal(PostProcessRenderContext context, Matrix4x4 origProj, Vector2 jitter)
    {
    #if UNITY_2017_2_OR_NEWER
    var planes = origProj.decomposeProjection;

    float vertFov = Math.Abs(planes.top) + Math.Abs(planes.bottom);
    float horizFov = Math.Abs(planes.left) + Math.Abs(planes.right);

    var planeJitter = new Vector2(jitter.x * horizFov / context.screenWidth,
    jitter.y * vertFov / context.screenHeight);

    planes.left += planeJitter.x;
    planes.right += planeJitter.x;
    planes.top += planeJitter.y;
    planes.bottom += planeJitter.y;

    var jitteredMatrix = Matrix4x4.Frustum(planes);

    return jitteredMatrix;
    #else
    var rTan = (1.0f + origProj[0, 2]) / origProj[0, 0];
    var lTan = (-1.0f + origProj[0, 2]) / origProj[0, 0];

    var tTan = (1.0f + origProj[1, 2]) / origProj[1, 1];
    var bTan = (-1.0f + origProj[1, 2]) / origProj[1, 1];

    float tanVertFov = Math.Abs(tTan) + Math.Abs(bTan);
    float tanHorizFov = Math.Abs(lTan) + Math.Abs(rTan);

    jitter.x *= tanHorizFov / context.screenWidth;
    jitter.y *= tanVertFov / context.screenHeight;

    float left = jitter.x + lTan;
    float right = jitter.x + rTan;
    float top = jitter.y + tTan;
    float bottom = jitter.y + bTan;

    var jitteredMatrix = new Matrix4x4();

    jitteredMatrix[0, 0] = 2f / (right - left);
    jitteredMatrix[0, 1] = 0f;
    jitteredMatrix[0, 2] = (right + left) / (right - left);
    jitteredMatrix[0, 3] = 0f;

    jitteredMatrix[1, 0] = 0f;
    jitteredMatrix[1, 1] = 2f / (top - bottom);
    jitteredMatrix[1, 2] = (top + bottom) / (top - bottom);
    jitteredMatrix[1, 3] = 0f;

    jitteredMatrix[2, 0] = 0f;
    jitteredMatrix[2, 1] = 0f;
    jitteredMatrix[2, 2] = origProj[2, 2];
    jitteredMatrix[2, 3] = origProj[2, 3];

    jitteredMatrix[3, 0] = 0f;
    jitteredMatrix[3, 1] = 0f;
    jitteredMatrix[3, 2] = -1f;
    jitteredMatrix[3, 3] = 0f;

    return jitteredMatrix;
    #endif
    }

    #endregion

    #region Reflection

    static IEnumerable<Type> m_AssemblyTypes;

    public static IEnumerable<Type> GetAllAssemblyTypes()
    {
    if (m_AssemblyTypes == null)
    {
    m_AssemblyTypes = AppDomain.CurrentDomain.GetAssemblies()
    .SelectMany(t =>
    {
    // Ugly hack to handle mis-versioned dlls
    var innerTypes = new Type[0];
    try
    {
    innerTypes = t.GetTypes();
    }
    catch { }
    return innerTypes;
    });
    }

    return m_AssemblyTypes;
    }

    // Quick extension method to get the first attribute of type T on a given Type
    public static T GetAttribute<T>(this Type type) where T : Attribute
    {
    Assert.IsTrue(type.IsDefined(typeof(T), false), "Attribute not found");
    return (T)type.GetCustomAttributes(typeof(T), false)[0];
    }

    // Returns all attributes set on a specific member
    // Note: doesn't include inherited attributes, only explicit ones
    public static Attribute[] GetMemberAttributes<TType, TValue>(Expression<Func<TType, TValue>> expr)
    {
    Expression body = expr;

    if (body is LambdaExpression)
    body = ((LambdaExpression)body).Body;

    switch (body.NodeType)
    {
    case ExpressionType.MemberAccess:
    var fi = (FieldInfo)((MemberExpression)body).Member;
    return fi.GetCustomAttributes(false).Cast<Attribute>().ToArray();
    default:
    throw new InvalidOperationException();
    }
    }

    // Returns a string path from an expression - mostly used to retrieve serialized properties
    // without hardcoding the field path. Safer, and allows for proper refactoring.
    public static string GetFieldPath<TType, TValue>(Expression<Func<TType, TValue>> expr)
    {
    MemberExpression me;
    switch (expr.Body.NodeType)
    {
    case ExpressionType.MemberAccess:
    me = expr.Body as MemberExpression;
    break;
    default:
    throw new InvalidOperationException();
    }

    var members = new List<string>();
    while (me != null)
    {
    members.Add(me.Member.Name);
    me = me.Expression as MemberExpression;
    }

    var sb = new StringBuilder();
    for (int i = members.Count - 1; i >= 0; i--)
    {
    sb.Append(members);
    if (i > 0) sb.Append('.');
    }

    return sb.ToString();
    }

    public static object GetParentObject(string path, object obj)
    {
    var fields = path.Split('.');

    if (fields.Length == 1)
    return obj;

    var info = obj.GetType().GetField(fields[0], BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.Instance);
    obj = info.GetValue(obj);

    return GetParentObject(string.Join(".", fields, 1, fields.Length - 1), obj);
    }

    #endregion
    }
    }
     
  13. Gregoryl

    Gregoryl

    Unity Technologies

    Joined:
    Dec 22, 2016
    Posts:
    7,728
    @DeansTV looks like you are using an outdated version of Cinemachine. Ty upgrading to the latest, via Package Manager. Also: please don't paste scripts directly into the thread, it's illegible. Either attach as a file, or use the "insert code" option:

    upload_2020-7-20_8-34-59.png