diff --git a/plugin/RunicNPC.cs b/plugin/RunicNPC.cs index aa69d14..2949df9 100644 --- a/plugin/RunicNPC.cs +++ b/plugin/RunicNPC.cs @@ -1123,6 +1123,10 @@ namespace Oxide.Plugins RunicNpcBrain brain = go.AddComponent(); CopyFields(_npcFields, stock, npc); CopyFields(_brainFields, stockBrain, brain); + // prefabID is a property now (Rust 11/25): Unity's deserialisation fills its encrypted + // value from serializedPrefabID, and an AddComponent never deserialises, so copying the + // field list leaves ours without the prefab's id (#32). + npc.prefabID = stock.prefabID; UnityEngine.Object.DestroyImmediate(stock, true); UnityEngine.Object.DestroyImmediate(stockBrain, true);