Search Unity

Probuilder: Deleted something I shouldn't have.

Discussion in 'World Building' started by NeatMaddness, Jul 19, 2018.

  1. NeatMaddness

    NeatMaddness

    Joined:
    Nov 14, 2014
    Posts:
    30
    Well… I deleted something I shouldn’t have. I am honestly not sure what I deleted but it was probably some Material.

    Here is what my old game objects built with ProBuilder look like:



    And here is what a new object built with it looks like:


    As you can see these used to have the “grid lined” material that was very helpful is gone. If I had to guess the material was deleted from the ProCore/Resources/Materials folder.


    This error is thrown when I create a “New Shape” from Probuilder:

    Code (CSharp):
    1. InvalidCastException: Cannot cast from source type to destination type.
    2.  
    3. ProBuilder2.EditorCommon.pb_Geometry_Interface.get_previewMat ()

    I was looking for some help on how to repair this without having to reimport ProBuild/Grids as my project is very far along and I would rather not risk breaking anything more.

    Any help or information you can provide would be greatly appreciated!
     
  2. kaarrrllll

    kaarrrllll

    Unity Technologies

    Joined:
    Aug 24, 2017
    Posts:
    552
    Just re-import the ProBuilder package. If you're concerned about breaking things, you can just select the missing material in the Package Importer window.
     
  3. Kurt-Dekker

    Kurt-Dekker

    Joined:
    Mar 16, 2013
    Posts:
    38,742
    I highly recommend you immediately put your project under source control (I use git, it plays very nicely with Unity3D, but read around online about the little setup steps a bit: a good gitignore file, Force Text serialization, visible meta files, etc.) and be very disciplined about committing regularly when you have each logical piece of work done.

    And then for additional backup, make an account on bitbucket and push your repo up there so it isn't only spinning on your one hard drive.

    I never work without source control anymore, even for the tiniest triviallest thing, and it is constantly saving my bacon from inadvertent slipups like this, plus it leaves a good trail of work accomplished and what happened where and by whom.