Search Unity

  1. If you have experience with import & exporting custom (.unitypackage) packages, please help complete a survey (open until May 15, 2024).
    Dismiss Notice
  2. Unity 6 Preview is now available. To find out what's new, have a look at our Unity 6 Preview blog post.
    Dismiss Notice

Newbie Question

Discussion in 'Getting Started' started by Deleted User, Aug 6, 2018.

  1. Deleted User

    Deleted User

    Guest

    I have no coding experience - just starting with Unity and I am running into a problem with script errors. I have figured out how to fix the errors and attach the script to Unity but every time I reuse the script I have to go back into Visual Studio and re-fix the same errors. How do I save the C# file within the asset package so I don't have to keep fixing the same errors. Thanks
     
  2. JoeStrout

    JoeStrout

    Joined:
    Jan 14, 2011
    Posts:
    9,859
    Please be specific. Which package, which script, what errors?
     
  3. Deleted User

    Deleted User

    Guest

    Thank you for the reply! For instance the
    https://github.com/unity3d-jp/AlembicForUnity
    I'm very new to this so I may be misusing terminology. I installed the script and it returned several random errors (too many to list - errors referencing monobehavior and regarding something being "obsolete" etc.) but the errors themselves I was able to fix by following the prompts within Visual studio and searching on the internet for solutions and I got the script working within Unity and I was able to load an Alembic file etc.
    My question is, once I have fixed the errors and have successfully attached the script to Unity and it runs properly how do I save the corrections I made to the script so I don't have to keep fixing the same errors each time I use the script in a new project. The save functions don't appear to save the corrections to the original script. Do I need to create a new version of it and save that? Each time I start a new project and try to install the Alembic for Unity script I get the same lengthy list of errors. Can I reasonably expect that once I fix errors within a script that they can be saved and consistently attached to Unity without returning the same errors unless I update to newer version of Unity?
     
  4. JoeStrout

    JoeStrout

    Joined:
    Jan 14, 2011
    Posts:
    9,859
    Ah, I see. Every time you open a new project, you're re-importing the package. The package (of course) doesn't include any changes you made after importing it into some other project.

    Once you've fixed things, you should throw that package away. If you want to use this stuff in a new project, just copy over the relevant folders from your project where you got it working.