public void Match(GRP_ManagerBase source) { backgroundImage = source.backgroundImage; backgroundTint = source.backgroundTint; bodyFont = source.bodyFont; bodyFontSize = source.bodyFontSize; bodyTextColor = source.bodyTextColor; buttonBleed = source.buttonBleed; buttonDirection = source.buttonDirection; buttonFont = source.buttonFont; buttonFontSize = source.buttonFontSize; buttonImage = source.buttonImage; buttonPadding = source.buttonPadding; buttonPrefixImage = source.buttonPrefixImage; buttonPressedImage = source.buttonPressedImage; buttonSeparation = source.buttonSeparation; buttonSeparator = source.buttonSeparator; buttonTextColor = source.buttonTextColor; buttonTextColorPressed = source.buttonTextColorPressed; container = source.container; containerBleed = source.containerBleed; containerImage = source.containerImage; containerPadding = source.containerPadding; containerTint = source.containerTint; fadeAnimation = source.fadeAnimation; fadeDuration = source.fadeDuration; fadeProfile = source.fadeProfile; flexibleHeight = source.flexibleHeight; flexibleWidth = source.flexibleWidth; fullscreenBottom = source.fullscreenBottom; fullscreenLeft = source.fullscreenLeft; fullscreenRight = source.fullscreenRight; fullscreenTop = source.fullscreenTop; generalButtonPressedTint = source.generalButtonPressedTint; generalButtonTint = source.generalButtonTint; initialize = source.initialize; makeThisParent = source.makeThisParent; messagePadding = source.messagePadding; placement = source.placement; promptInputFieldImage = source.promptInputFieldImage; promptInputFieldTint = source.promptInputFieldTint; promptInputfieldColor = source.promptInputfieldColor; promptPlaceholderColor = source.promptPlaceholderColor; promptType = source.promptType; referenceSize = source.referenceSize; returnButtonImage = source.returnButtonImage; returnButtonPressedImage = source.returnButtonPressedImage; returnButtonPressedTint = source.returnButtonPressedTint; returnButtonTint = source.returnButtonTint; returnPosition = source.returnPosition; returnTextColor = source.returnTextColor; returnTextColorPressed = source.returnTextColorPressed; showBehaviour = source.showBehaviour; showButtons = source.showButtons; showDesign = source.showDesign; showRatios = source.showRatios; showTypography = source.showTypography; staticAnchor = source.staticAnchor; staticAnchorX = source.staticAnchorX; staticAnchorY = source.staticAnchorY; staticHeight = source.staticHeight; staticWidth = source.staticWidth; staticX = source.staticX; staticY = source.staticY; textAlignment = source.textAlignment; titleColor = source.titleColor; titleFont = source.titleFont; titleFontSize = source.titleFontSize; titlePadding = source.titlePadding; titleSeparator = source.titleSeparator; worldFollowAxes = source.worldFollowAxes; worldHeight = source.worldHeight; worldPosition = source.worldPosition; worldRotation = source.worldRotation; worldScale = source.worldScale; worldWidth = source.worldWidth; }
protected void OnAwake(GRP_ManagerBase pm) { rmb = pm; savePresetButtonText = "Create a Preset"; presetFolderPath = FindAbsolutePath("GRP_Presets"); if (presetFolderPath == null) { AssetDatabase.CreateFolder("Assets", "GRP_Presets"); presetFolderPath = "Assets/GRP_Presets"; Debug.Log("Preset folder missing!"); Debug.Log("New preset folder is created here:"); Debug.Log(presetFolderPath); } PopulatePresetList(); EditorStyles.foldout.fontStyle = FontStyle.Bold; deleteTex = (Texture)Resources.Load("Sprites/UI/bin"); upTex = (Texture)Resources.Load("Sprites/UI/up"); downTex = (Texture)Resources.Load("Sprites/UI/down"); EditorStyles.textArea.wordWrap = true; if (rmb.initialize) { if (Camera.main == null) { rmb.referenceSize = new Vector2Int(1920, 1080); } else if (Camera.main.pixelWidth > Camera.main.pixelHeight) { rmb.referenceSize = new Vector2Int(1920, 1080); } else if (Camera.main.pixelWidth < Camera.main.pixelHeight) { rmb.referenceSize = new Vector2Int(1080, 1920); } else { rmb.referenceSize = new Vector2Int(1080, 1080); } rmb.worldFollowAxes = new Vector3Bool(); rmb.title = "Hi there"; rmb.message = "Seems like you prefer to do things manually.\n\nI like the cut of your jib."; //Manually load simple red. //Just in case. rmb.containerPadding = 5; rmb.titlePadding = 5; rmb.messagePadding = 5; rmb.buttonPadding = 5; rmb.backgroundTint = new Color(0, 0, 0, 0.4980392f); rmb.containerTint = new Color(1, 1, 1, 1); rmb.returnButtonTint = new Color(0.8823529f, 0, 0, 1); rmb.generalButtonTint = new Color(1, 1, 1, 0); rmb.returnButtonPressedTint = new Color(0.7058824f, 0, 0, 1); rmb.generalButtonPressedTint = new Color(0, 0, 0, 0.05882353f); rmb.titleColor = new Color(0, 0, 0, 0.9215f); rmb.bodyTextColor = new Color(0, 0, 0, 0.9215f); rmb.buttonTextColor = new Color(0, 0, 0, 0.9215f); rmb.returnTextColor = new Color(1, 1, 1, 0.8823529f); rmb.buttonTextColorPressed = new Color(0, 0, 0, 1); rmb.returnTextColorPressed = new Color(1, 1, 1, 0.8823529f); rmb.promptPlaceholderColor = new Color(0, 0, 0, 0.4f); rmb.promptInputfieldColor = new Color(0, 0, 0, 0.9215f); rmb.promptInputFieldTint = new Color(0, 0, 0, 0.1f); rmb.titleFontSize = 60; rmb.bodyFontSize = 36; rmb.buttonFontSize = 36; rmb.textAlignment = TextAlignment.Center; rmb.fadeDuration = 0.25f; rmb.fadeProfile = AnimationCurve.Linear(0, 0, 1, 1); rmb.fadeAnimation = FadeAnimation.Fade; rmb.initialize = false; } }