Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 12 Next capture
2021 2022 2023
1 capture
12 Jun 22 - 12 Jun 22
sparklines
Close Help
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
  • Help Room /
avatar image
2
Question by CB-TV · Nov 20, 2015 at 09:26 AM · standard-assetsstandard assets

UNetWeaver error + Failure generating network code

After upgrading to Unity 5.2.2 from 5.0.1, two errors have appeared in the console. They are as follows:

 UNetWeaver error: Exception :Mono.Cecil.AssemblyResolutionException: Failed to resolve assembly: 'UnityEngine.Networking, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null'
 at Mono.Cecil.BaseAssemblyResolver.Resolve (Mono.Cecil.AssemblyNameReference name, Mono.Cecil.ReaderParameters parameters) [0x00000] in <filename unknown>:0
 at Mono.Cecil.BaseAssemblyResolver.Resolve (Mono.Cecil.AssemblyNameReference name) [0x00000] in <filename unknown>:0
 at Mono.Cecil.DefaultAssemblyResolver.Resolve (Mono.Cecil.AssemblyNameReference name) [0x00000] in <filename unknown>:0
 at Mono.Cecil.MetadataResolver.Resolve (Mono.Cecil.TypeReference type) [0x00000] in <filename unknown>:0
 at Mono.Cecil.ModuleDefinition.Resolve (Mono.Cecil.TypeReference type) [0x00000] in <filename unknown>:0
 at Mono.Cecil.TypeReference.Resolve () [0x00000] in <filename unknown>:0
 at Unity.UNetWeaver.Weaver.ResolveMethod (Mono.Cecil.TypeReference t, System.String name) [0x0001e] in C:\buildslave\unity\build\Extensions\Networking\Weaver\UNetWeaver.cs:1013
 at Unity.UNetWeaver.Weaver.SetupTargetTypes () [0x00776] in C:\buildslave\unity\build\Extensions\Networking\Weaver\UNetWeaver.cs:1279
 at Unity.UNetWeaver.Weaver.Weave (System.String assName, IEnumerable`1 dependencies, IAssemblyResolver assemblyResolver, System.String unityEngineDLLPath, System.String unityUNetDLLPath, System.String outputDir) [0x0003e] in C:\buildslave\unity\build\Extensions\Networking\Weaver\UNetWeaver.cs:1570
 at Unity.UNetWeaver.Weaver.WeaveAssemblies (IEnumerable`1 assemblies, IEnumerable`1 dependencies, IAssemblyResolver assemblyResolver, System.String outputDir, System.String unityEngineDLLPath, System.String unityUNetDLLPath) [0x00062] in C:\buildslave\unity\build\Extensions\Networking\Weaver\UNetWeaver.cs:1676
 UnityEngine.Debug:LogError(Object)
 Unity.UNetWeaver.Log:Error(String) (at C:/buildslave/unity/build/Extensions/Networking/Weaver/Program.cs:20)
 Unity.UNetWeaver.Weaver:WeaveAssemblies(IEnumerable`1, IEnumerable`1, IAssemblyResolver, String, String, String) (at C:/buildslave/unity/build/Extensions/Networking/Weaver/UNetWeaver.cs:1683)
 Unity.UNetWeaver.Program:process(String, String, String, String[], String[], IAssemblyResolver, Action`1, Action`1) (at C:/buildslave/unity/build/Extensions/Networking/Weaver/Program.cs:34)
 UnityEditor.Scripting.Serialization.Weaver:WeaveUnetFromEditor(String, String, String, String, Boolean)

and

 Failure generating network code.
 UnityEditor.Scripting.Serialization.Weaver:WeaveUnetFromEditor(String, String, String, String, Boolean)

I have done some research into these errors here and here and they seem to be either a Unity bug (which was supposedly fixed in 5.1) or a problem with a Unity Standard Asset. The error doesn't seem to be too common which is surprising since for me, it is caused when I import the Unity Standard Asset: FOVKick.cs in the Utility folder. I found a forum here with a similar error saying something about using command lines. These command lines are present in the FOVKick script below:

 using System;
 using System.Collections;
 using UnityEngine;
 
 namespace UnityStandardAssets.Utility
 {
     [Serializable]
     public class FOVKick
     {
         public Camera Camera;                           // optional camera setup, if null the main camera will be used
         [HideInInspector] public float originalFov;     // the original fov
         public float FOVIncrease = 3f;                  // the amount the field of view increases when going into a run
         public float TimeToIncrease = 1f;               // the amount of time the field of view will increase over
         public float TimeToDecrease = 1f;               // the amount of time the field of view will take to return to its original size
         public AnimationCurve IncreaseCurve;
 
 
         public void Setup(Camera camera)
         {
             CheckStatus(camera);
 
             Camera = camera;
             originalFov = camera.fieldOfView;
         }
 
 
         private void CheckStatus(Camera camera)
         {
             if (camera == null)
             {
                 throw new Exception("FOVKick camera is null, please supply the camera to the constructor");
             }
 
             if (IncreaseCurve == null)
             {
                 throw new Exception(
                     "FOVKick Increase curve is null, please define the curve for the field of view kicks");
             }
         }
 
 
         public void ChangeCamera(Camera camera)
         {
             Camera = camera;
         }
 
 
         public IEnumerator FOVKickUp()
         {
             float t = Mathf.Abs((Camera.fieldOfView - originalFov)/FOVIncrease);
             while (t < TimeToIncrease)
             {
                 Camera.fieldOfView = originalFov + (IncreaseCurve.Evaluate(t/TimeToIncrease)*FOVIncrease);
                 t += Time.deltaTime;
                 yield return new WaitForEndOfFrame();
             }
         }
 
 
         public IEnumerator FOVKickDown()
         {
             float t = Mathf.Abs((Camera.fieldOfView - originalFov)/FOVIncrease);
             while (t > 0)
             {
                 Camera.fieldOfView = originalFov + (IncreaseCurve.Evaluate(t/TimeToDecrease)*FOVIncrease);
                 t -= Time.deltaTime;
                 yield return new WaitForEndOfFrame();
             }
             //make sure that fov returns to the original size
             Camera.fieldOfView = originalFov;
         }
     }
 }

I hope you can help, I'm not sure why this is happening but at least I've found a lot of information about it. Is there any way to fix it except for downgrading? It's stopping my project!

I do not use networking and do not want multiplayer in my project but it gives me this error just because of one asset.

Comment
Add comment
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

0 Replies

· Add your reply
  • Sort: 

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this Question

Answers Answers and Comments

34 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

Making an Attack Combo Blend Tree with the Standard Asset Blend Tree 0 Answers

Standard Assets / Effects missing Camera effects in 5.6.0f3 1 Answer

How should I use the `FreeLookCam` script located in the standard assets folder 0 Answers

Where do I find the Standard Assets on Unity 2019? 0 Answers

im using unity 2018.4 standard assets and i added arms to a FPSController and the arms dont have collision 0 Answers


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges