This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include "PropertyChangeTestActor.h" | |
APropertyChangeTestActor::APropertyChangeTestActor() { | |
PrimaryActorTick.bCanEverTick = false; | |
RootComp = CreateDefaultSubobject<USceneComponent>(TEXT("RootComponent")); | |
RootComp->SetMobility(EComponentMobility::Static); | |
SetRootComponent(RootComp); | |
// first-time init |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import json | |
import os | |
import re | |
import requests | |
import datetime | |
import sys | |
import webbrowser | |
from time import sleep | |
from random import uniform | |
from os.path import exists |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import os | |
import disnake | |
import random | |
from disnake.ext import commands | |
from dotenv import load_dotenv | |
# load bot token from environment variable file | |
load_dotenv() | |
TOKEN = os.getenv('DISCORD_TOKEN') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
bool AnimContainsNotifyName(FName Name, const UAnimSequenceBase* Anim) | |
{ | |
// evaluate each track in the montage | |
for (FAnimNotifyTrack trk : Anim->AnimNotifyTracks) | |
{ | |
// evaluate each notify within each track | |
for (FAnimNotifyEvent* evt : trk.Notifies) | |
{ | |
// does this notify name match the in Name? | |
if (evt->NotifyName == Name) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* R/G/B/A channels of an image represented as enumeration. | |
*/ | |
UENUM(BlueprintType) | |
enum class ETextureChannel : uint8 | |
{ | |
R UMETA(DisplayName = "Red"), | |
G UMETA(DisplayName = "Green"), | |
B UMETA(DisplayName = "Blue"), | |
A UMETA(DisplayName = "Alpha"), |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ************************************************************************************************** | |
// saves a copy of the active document as png, with a given suffix, into a subfolder with the document's name | |
// example: file1.psd saved as copy to => /file1/file1_d.png | |
// | |
// to export other file types (eg, _a): copy the script and save as "export_a.jsx" or something similar | |
// then change the suffix on line 10 to equal the desired suffix (eg '_a' instead of '_d') | |
// ************************************************************************************************** | |
// the suffix which gets appended to the file | |
var suffix = '_d'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var suffix = '_d'; | |
var filename = activeDocument.name.match(/(.*)\.[^\.]+$/)[1]; | |
activeDocument.saveAs(File(activeDocument.fullName.parent + '/' + filename + suffix), new PNGSaveOptions(), true); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# copy the 'asset tooltip' (AssetStagingArea) | |
Set-Location "C:\users\spence\appdata\local\colossal order\cities_skylines\assetstagingarea\" | |
$destTTPath = Get-ChildItem -Recurse -Include asset_tooltip.png -Name | |
Copy-Item -path "G:\Dev\Skylines\! scripts\asset_tooltip.png" -Destination $destTTPath | |
# copy the 'snapshot' (overwrites most recent snap) | |
Set-Location "C:\Users\Spence\AppData\Local\Colossal Order\Cities_Skylines\Snapshots" | |
$destSnapPath = Get-ChildItem -Recurse -Include snapshot.png | sort LastWriteTime | select -last 1 | |
Copy-Item -path "G:\Dev\Skylines\! scripts\snapshot.png" -Destination $destSnapPath |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System.Collections.Generic; | |
using UnityEngine; | |
// Displays a random quote inside a UI text component. | |
[RequireComponent(typeof(UnityEngine.UI.Text))] | |
public class RandomQuoteDisplay : MonoBehaviour | |
{ | |
[Multiline] | |
// the List of potential quotes to display | |
public List<string> Quotes = new List<string>() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="utf-8"?> | |
<CodeSnippets | |
xmlns="http://schemas.microsoft.com/VisualStudio/2005/CodeSnippet"> | |
<CodeSnippet Format="1.0.0"> | |
<Header> | |
<Title>FormerlySerializedAs</Title> | |
<Shortcut>fsa</Shortcut> | |
<SnippetTypes> | |
<SnippetType>Expansion</SnippetType> | |
</SnippetTypes> |