public void Load() { if (Loader is null) { FARLogger.WarningFormat("Could not load resource from {0} because loader is not set", Url); return; } MainThread.StartCoroutine(() => Loader.Load(this)); }
private void UpdateMovableSection() { movableSection = part.FindModelTransform(transformName); //And the transform if (movableSection is null) { FARLogger.WarningFormat("No valid control surface model with transform name {0} found on {1}, animations disabled", transformName, part?.partName); animated = false; return; } if (!MovableOrigReady) { // In parts copied by symmetry, these fields should already be set, // while the transform may not be in the original orientation anymore. MovableOrig = movableSection.localRotation; //Its original orientation MovableOrigReady = true; } flipAxis = Vector3.Dot(movableSection.right, part.partTransform.right) <= 0; animated = HighLogic.LoadedSceneIsFlight && part is not null && vessel is not null; }