Esempio n. 1
0
	public void SetupProfile() {
		if (LightingManager2D.initialized) {
			return;
		}

		LightingManager2D.initialized = true;

		LightingSettings.Profile profile = Lighting2D.Profile;
		Lighting2D.UpdateByProfile(profile);

		AtlasSystem.Manager.Initialize();
		Lighting2D.materials.Reset();
	}
Esempio n. 2
0
	private void Update() {
		if (Lighting2D.disable) {
			return;
		}

		ForceUpdate(); // For Late Update Method?

		//if (Input.GetKey(KeyCode.LeftControl) && Input.GetKey(KeyCode.LeftShift) && Input.GetKeyDown(KeyCode.L)) {
		//	debug = !debug;
		//}

		if (profile != null) {
			if (Lighting2D.Profile != profile) {
				Lighting2D.UpdateByProfile(profile);
			}
        }
	}
    static public void Draw()
    {
        EditorGUI.BeginChangeCheck();

        LightingSettings.ProjectSettings mainProfile = Lighting2D.ProjectSettings;

        mainProfile.Profile = (LightingSettings.Profile)EditorGUILayout.ObjectField("Default Profile", mainProfile.Profile, typeof(LightingSettings.Profile), true);

        EditorGUILayout.Space();

        mainProfile.renderingMode = (RenderingMode)EditorGUILayout.EnumPopup("Rendering Mode", mainProfile.renderingMode);

        EditorGUILayout.Space();

        mainProfile.colorSpace = (LightingSettings.ColorSpace)EditorGUILayout.EnumPopup("Color Space", mainProfile.colorSpace);

        EditorGUILayout.Space();

        mainProfile.managerInstance = (LightingSettings.ManagerInstance)EditorGUILayout.EnumPopup("Manager Instance", mainProfile.managerInstance);

        mainProfile.managerInternal = (LightingSettings.ManagerInternal)EditorGUILayout.EnumPopup("Manager Internal", mainProfile.managerInternal);

        EditorGUILayout.Space();

        mainProfile.MaxLightSize = EditorGUILayout.IntSlider("Max Light Size", mainProfile.MaxLightSize, 10, 1000);

        EditorGUILayout.Space();

        EditorView.Draw(mainProfile);

        EditorGUILayout.Space();

        Chunks.Draw(mainProfile);

        EditorGUI.EndChangeCheck();

        if (GUI.changed)
        {
            LightingManager2D.ForceUpdate();
            Lighting2D.UpdateByProfile(mainProfile.Profile);

            EditorUtility.SetDirty(mainProfile);
        }
    }