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
static const FString RootName = "SGameLayerManager"; | |
bool IsOverUIElement() | |
{ | |
FVector2D CursorPos = FSlateApplication::Get().GetCursorPos(); | |
FWidgetPath WidgetPath = FSlateApplication::Get().LocateWindowUnderMouse( CursorPos, FSlateApplication::Get().GetInteractiveTopLevelWindows() ); | |
if ( WidgetPath.IsValid() ) | |
{ | |
const FArrangedChildren::FArrangedWidgetArray& AllArrangedWidgets = WidgetPath.Widgets.GetInternalArray(); |
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
@echo off | |
SETLOCAL | |
rem Set your plugin name, should match the .uplugin filename | |
set PLUGIN_NAME=BYGYouTrackFiller | |
rem Always add trailing space please | |
rem Don't put trailing slashes | |
set UNREAL_PATHS=E:\UE_4.25 ^ | |
E:\UE_4.26 ^ |
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 UnityEngine; | |
using System.Collections; | |
using System.Collections.Generic; | |
public class Outliner : BaseBehaviour | |
{ | |
void Awake() | |
{ | |
GetComponent<MeshFilter>().mesh | |
= FindOutlinePairs(GetComponent<MeshFilter>().mesh); |
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 UnityEngine; | |
using System.Collections; | |
[ExecuteInEditMode] | |
public class NormalEditor : BaseBehaviour | |
{ | |
Mesh m_mesh; | |
public Mesh Mesh { get { return m_mesh; } } | |
[SerializeField] |
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 UnityEngine; | |
using System.Collections; | |
using System.Text; | |
public class ErrorReporter | |
{ | |
static string m_postUrl = "http://www.yoursite.com/reports/report.cgi"; | |
static string m_reportUrl = "http://www.yoursite.com/reports/"; | |
// Take screenshot |
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 UnityEngine; | |
using System.Collections; | |
using System.Collections.Generic; | |
public class CoroutineSyncer : MonoBehaviour | |
{ | |
static CoroutineSyncer m_instance; | |
public static CoroutineSyncer Instance | |
{ | |
get |
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
snippet find | |
GameObject.Find("${1}")${2} | |
snippet gc | |
GetComponent<${1}>() | |
snippet ac | |
AddComponent<${1}>() | |
snippet sar | |
SetActiveRecursively(${1:true}) | |
snippet rc | |
[RequireComponent (typeof(${1:AudioSource}))] |
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 UnityEngine; | |
using System.Collections; | |
public class OrderTester : MonoBehaviour { | |
void Update() { Debug.Log("Update()"); } | |
void LateUpdate() { Debug.Log("LateUpdate()"); } | |
void FixedUpdate() { Debug.Log("FixedUpdate()"); } | |
void Awake() { Debug.Log("Awake()"); } | |
void Start() { Debug.Log("Start()"); } | |
void Reset() { Debug.Log("Reset()"); } |
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
function love.load() | |
-- Load our image we want to draw many times | |
image = love.graphics.newImage("dirt.png") | |
-- The number of tiles we want to draw is pretty much the number | |
-- that will fit on the screen | |
maxX = math.ceil(love.graphics.getWidth() / image:getWidth()) + 2 | |
maxY = math.ceil(love.graphics.getHeight() / image:getHeight()) + 2 | |
local size = maxX * maxY | |
print(size) |
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
-- Add this line to the main hardoncollider/init.lua file around line 136 | |
-- to allow you to add preconstructed shapes. | |
function HC:addExistingShape(shape) | |
return new_shape(self, shape) | |
end |
NewerOlder