private void LoadPhysicsConfig() { log("Loading Physics.cfg"); UrlDir gameDataDir = GameDatabase.Instance.root.AllDirectories.First(d => d.path.EndsWith("GameData") && d.name == "" && d.url == ""); // need to use a file with a cfg extenssion to get the right fileType or you can't AddConfig on it physicsUrlFile = new UrlDir.UrlFile(gameDataDir, new FileInfo(defaultPhysicsPath)); // Since it loaded the default config badly (sub node only) we clear it first physicsUrlFile.configs.Clear(); // And reload it properly ConfigNode physicsContent = ConfigNode.Load(defaultPhysicsPath); physicsContent.name = "PHYSICSGLOBALS"; physicsUrlFile.AddConfig(physicsContent); gameDataDir.files.Add(physicsUrlFile); }