{"record":{"id":"0c2c95ea082a6605","repo":"FyroxEngine/Fyrox","slug":"script-instance-of-id-loaded-successfully-using","errorCode":null,"errorMessage":"Script instance of id {} loaded successfully using compatibility loader! Resave the script!","messagePattern":"Script instance of id (.+?) loaded successfully using compatibility loader! Resave the script!","errorType":"console","errorClass":null,"httpStatus":null,"severity":"warning","filePath":"fyrox-impl/src/script/mod.rs","lineNumber":749,"sourceCode":"        let mut region_guard = visitor.enter_region(name)?;\n\n        // Check for new format first, this branch will fail only on attempt to deserialize\n        // scripts in old format.\n        if self.instance.visit(\"Data\", &mut region_guard).is_ok() {\n            // Visit flags.\n            self.initialized.visit(\"Initialized\", &mut region_guard)?;\n        } else {\n            Log::warn(format!(\n                \"Unable to load script instance of id {} in new format! Trying to load in old format...\",\n                self.id()\n            ));\n\n            // Leave region and try to load in old format.\n            drop(region_guard);\n\n            self.instance.visit(name, visitor)?;\n\n            Log::warn(format!(\n                \"Script instance of id {} loaded successfully using compatibility loader! Resave the script!\",\n                self.id()\n            ));\n        }\n\n        Ok(())\n    }\n}\n\nimpl Clone for Script {\n    fn clone(&self) -> Self {\n        Self {\n            instance: self.instance.clone_box(),\n            initialized: false,\n            started: false,\n        }\n    }\n}","sourceCodeStart":731,"sourceCodeEnd":767,"githubUrl":"https://github.com/FyroxEngine/Fyrox/blob/76c91aad8eca488ce527b1af707be8b3b24ad72d/fyrox-impl/src/script/mod.rs#L731-L767","documentation":"After successfully deserializing a script instance through the legacy-format compatibility loader, Fyrox logs this warning reminding the developer that the data was written in the old format. The load succeeded, but the scene file should be re-saved so future loads use the current format. Repeated warnings on every load indicate stale serialized assets.","triggerScenarios":"Loading a scene/prefab with old-format script data where the compatibility visit (self.instance.visit(name, ...)) succeeds; every load of that asset until it is re-saved triggers the warning.","commonSituations":"Projects migrated from older Fyrox versions where some scenes were never re-saved; CI/headless loaders that consume assets without saving them back.","solutions":["Open and re-save the containing scene/prefab in the current Fyrox editor as the message instructs.","Run a batch migration: load every scene/prefab and save it with the current engine before shipping.","Verify by reloading that the warning no longer appears."],"exampleFix":null,"handlingStrategy":"fallback","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":["Re-save the asset exactly as the message instructs.","Add a migration step to your build pipeline: load and re-save all scenes after upgrades.","Grep logs for this warning in CI to catch stale serialized assets."],"tags":["fyrox","serialization","scripts","migration"],"backgroundTag":"deprecated-api-usage","analyzedSha":"76c91aad8eca488ce527b1af707be8b3b24ad72d","analyzedAt":"2026-09-10T16:04:01.633Z","contentChangedAt":"2026-09-10T16:04:01.633Z","schemaVersion":2},"datasetVersion":"2026-09-16T09:17:16.951Z"}