Skip to content

The given key 'EnemyAnimations' was not present in the dictionary #3742

@Squashi11

Description

@Squashi11

Description

The given key 'EnemyAnimations' was not present in the dictionary after upgrading to netcode 2.6.0. happens when we try to send an rpc from SPAWNED network behaviour

Reproduce Steps

  1. Start Server
  2. Instantiate prefab and spawn it
  3. Get network behaviour that synces animation states and try to send an RPC
  4. See error in console

Actual Outcome

After updating to netcode 2.6.0. this error started popping up when starting our game

Expected Outcome

No errors, with the proper RPC being send to all clients

Screenshots

Image

Environment

  • OS: [Windows 11]
  • Unity Version: [6000.2.9f2]
  • Netcode Version: [2.6.0]
  • Netcode Topology: [Client Server]

Additional Context

What we tried :
Re- adding and deleting from Network Prefabs
Changing spawn order and checking if object is spawned
But downgrading netcode version fixes the problem!

Full explanation :

We spawn a network agent on navmesh
This network agent has an EnemyAnimation script attached to it on its first child (visual part)
Its references from the root gameobject (Slimag)
Prefab hierarchy
Image

How the script from child is called from main code (OnNetworkSpawn executes this but we run a check just in case)
Image

Metadata

Metadata

Labels

priority:highThis issue has high priority and we are focusing to resolve itstat:awaiting-responseAwaiting response from author. This label should be added manually.stat:importedStatus - Issue is tracked internally at Unitytype:bugBug Report

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions