Search Unity

  1. Unity 2018.1 has arrived! Read about it here
    Dismiss Notice
  2. Scriptable Render Pipeline improvements, Texture Mipmap Streaming, and more! Check out what we have in store for you in the 2018.2 Beta.
    Dismiss Notice
  3. If you couldn't join the live stream, take a peek at what you missed.
    Dismiss Notice
  4. Improve your Unity skills with a certified instructor in a private, interactive classroom. Learn more.
    Dismiss Notice
  5. ARCore is out of developer preview! Read about it here.
    Dismiss Notice
  6. Magic Leap’s Lumin SDK Technical Preview for Unity lets you get started creating content for Magic Leap One™. Find more information on our blog!
    Dismiss Notice
  7. Want to see the most recent patch releases? Take a peek at the patch release page.
    Dismiss Notice

copying properties from play mode onto prefabs

Discussion in 'Cinemachine' started by mradfo21, May 18, 2018.

  1. mradfo21

    mradfo21

    Joined:
    May 16, 2013
    Posts:
    140
    One thing that'd be an awesome additions is the ability to copy properties from something in game to a prefab on disc. Cinemachine's Composer doesn't abide by the normal "Paste Component Values" you can usually do from the gear menu

    upload_2018-5-18_12-38-23.png


    I believe this is because Cinemachine was expected to be used as a bunch of cameras sitting in a scene. They were never meant to be dynamically instantiated. The Save During Play mode is awesome! But if you find yourself using instantiated cameras there's 0 way to copy parameters tweaked during runtime.

    basically this section you have to copy by hand each time:

    upload_2018-5-18_12-40-33.png

    would be great to get some way to copy these parameters and paste them!
     

    Attached Files:

  2. Gregoryl

    Gregoryl

    Unity Technologies

    Joined:
    Dec 22, 2016
    Posts:
    1,217
    Actually you can copy/paste the whole vcam component, it will include all the Body/Aim/Noise subcomponents
     
  3. mradfo21

    mradfo21

    Joined:
    May 16, 2013
    Posts:
    140
    weird..

    so here i've edited things in game and im liking it:
    upload_2018-5-18_14-15-12.png


    and heres the prefab - notice its values are different (they are the bad ones)


    upload_2018-5-18_14-15-44.png

    i choose "Paste Values"

    and only this section will update

    upload_2018-5-18_14-16-10.png
     

    Attached Files:

  4. Gregoryl

    Gregoryl

    Unity Technologies

    Joined:
    Dec 22, 2016
    Posts:
    1,217
    oh, that's supposed to work. What version Unity and CM?
     
  5. mradfo21

    mradfo21

    Joined:
    May 16, 2013
    Posts:
    140
    2018.1.0f1

    cm 2.1.10

    i believe
     
  6. Gregoryl

    Gregoryl

    Unity Technologies

    Joined:
    Dec 22, 2016
    Posts:
    1,217
    If you're on 2018 you should upgrade Cinemachine to the latest (2.1.13), available on package manager.
    To upgrade without losing any of your work:
    1. Open an empty scene,
    2. Delete your Cinemachine asset,
    3. Then import it from the package manager.
    Of course, make a backup first, just in case.
     
  7. mradfo21

    mradfo21

    Joined:
    May 16, 2013
    Posts:
    140
    so i did this... and cinemachine fails to compile

    upload_2018-5-24_11-48-9.png

    what.. do i have to do to make CM actually compile?
     
  8. Gregoryl

    Gregoryl

    Unity Technologies

    Joined:
    Dec 22, 2016
    Posts:
    1,217
    You have to follow the instructions :p
    Delete the CM asset from your project before importing new one with package manager
     
  9. mradfo21

    mradfo21

    Joined:
    May 16, 2013
    Posts:
    140
    but i did? I just deleted the Cinemachine folder.. was that not the asset?

    sorry maybe i misunderstood the directions
     
  10. Gregoryl

    Gregoryl

    Unity Technologies

    Joined:
    Dec 22, 2016
    Posts:
    1,217
    So now you need to start over.
    Uninstall CM from Packman
    Delete the CM asset
    Reinstall CM from packman.
    If you don't do it in the right sequence there will be metafile hell.
     
  11. Gregoryl

    Gregoryl

    Unity Technologies

    Joined:
    Dec 22, 2016
    Posts:
    1,217
    Yes it is, but I see in your log that the complaining files are Assets/Cinemachine/blabla... so clearly you didn't delete the folder
     
  12. mradfo21

    mradfo21

    Joined:
    May 16, 2013
    Posts:
    140
    hu.. so yeah i still get the same errors

    upload_2018-5-24_11-52-40.png

    now the cinemachine asset

    thats just this folder right?
    upload_2018-5-24_11-53-3.png




    do i need to delete, restart, then try this?
     
  13. Gregoryl

    Gregoryl

    Unity Technologies

    Joined:
    Dec 22, 2016
    Posts:
    1,217
    Just delete it. No restart needed. Do you have some kind of version control that's putting it back?
     
  14. mradfo21

    mradfo21

    Joined:
    May 16, 2013
    Posts:
    140
    i use unity collaborate
     
  15. mradfo21

    mradfo21

    Joined:
    May 16, 2013
    Posts:
    140
    yeah even restarting still keeps those errors
     
  16. mradfo21

    mradfo21

    Joined:
    May 16, 2013
    Posts:
    140
    collaborate must keep the meta files?

    upload_2018-5-24_11-56-58.png
     
  17. mradfo21

    mradfo21

    Joined:
    May 16, 2013
    Posts:
    140
    so deleting the .meta files didn't change the compile errors. So are the files

    CinemachinePostFX.cs
    CinemachineMixer.cs

    not used by cinemachine but included by mistake somehow in my setup?
     
  18. mradfo21

    mradfo21

    Joined:
    May 16, 2013
    Posts:
    140
    going back to the asset store version
     
  19. mradfo21

    mradfo21

    Joined:
    May 16, 2013
    Posts:
    140
    wow... so the asset store doesn't compile now either. So this has totally bricked my project...

    upload_2018-5-24_12-5-14.png


    i love unity. i love unity *tells self
     
  20. mradfo21

    mradfo21

    Joined:
    May 16, 2013
    Posts:
    140
    after trying the package manager version again i get NEW errors..

    upload_2018-5-24_12-10-40.png


    whats going on?
     
  21. mradfo21

    mradfo21

    Joined:
    May 16, 2013
    Posts:
    140
    ok so after updating to 2018.1.1f i was able to use the package manager.

    but some code i'd written has these errors

    Gregoryl I know im probably an annoying thorn in the side but any chance you could help me with these?
    upload_2018-5-24_12-39-56.png

    what did the orbital transposers m_HeadingBias get changed to?

    and what did Recentering become?

    transposer.m_RecenterToTargetHeading.m_enabled = enabled;
     
  22. mradfo21

    mradfo21

    Joined:
    May 16, 2013
    Posts:
    140
    aw... so the code isn't included with cinemachine anymore? how should I figure out how to modify anything through c#?
     
  23. mradfo21

    mradfo21

    Joined:
    May 16, 2013
    Posts:
    140
    oh man... aaaand it reset every camera in the game. oh boy..
     
  24. Gregoryl

    Gregoryl

    Unity Technologies

    Joined:
    Dec 22, 2016
    Posts:
    1,217
    @mradfo21 Sorry I didn't mean to drop out... missed this thread. Have you solved the issues? It looks to me as though you were not successfully deleting old versions of CM before installing new ones.
     
  25. mradfo21

    mradfo21

    Joined:
    May 16, 2013
    Posts:
    140
    The original issue of the properties not being copy-able still persists sadly. But it's cool, i'm adjusting to CM. Its very mean to prefabs. I tend to lose alot of work (especially when it corrupts the prefabs on disc) but if I can get things slugged into version control then I can just revert and use that as the baseline so i've got a workflow going!

    I'm bad at following up on some of these things myself as i'm also trying to move this slice forward. I'm gonna get you a simple demo repro of the blending problems I was having in another thread soon!