Skip to content

Instantly share code, notes, and snippets.

View Doppelkeks's full-sized avatar

guntrumm Doppelkeks

View GitHub Profile
Doppelkeks / exportSelectedGroup.jsx
Created November 24, 2023 18:32
Export a selected group as .png in Photoshop (Script)
// Check if Photoshop is active and a document is open
if (app.documents.length > 0) {
var doc = app.activeDocument;
var layerVisibility = [];
// Function to check if the active layer is a group
function isLayerGroup(layer) {
try {
var temp = layer.layers.length;
return true;
Doppelkeks / ExampleProjectSettings.cs
Last active November 24, 2023 13:29
Unity provides the SettingsProvider API to create custom project settings. Additionally, there exists the ScriptableSingleton class to create a scriptable objects that can be statically referenced and kept outside the assets folder. This combines both APIs, to create custom project settings in the editor without the hassle.
[FilePath("ProjectSettings/" + nameof(ExampleProjectSettings) + ".asset", FilePathAttribute.Location.ProjectFolder)]
public class ExampleProjectSettings : SimpleSettings<ExampleProjectSettings> {
/// <summary>
/// the display path in the project settings window
/// </summary>
private const string WINDOW_PATH = "Tools/" + nameof(ExampleProjectSettings);
public bool exampleSettingBool;
/// <summary>