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 <sys/types.h> | |
#include <stdio.h> | |
#include <unistd.h> | |
#include <sys/wait.h> | |
#include <stdlib.h> | |
double factorial(int); | |
int main(void) | |
{ |
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 <sys/types.h> | |
#include <stdio.h> | |
#include <unistd.h> | |
#include <sys/wait.h> | |
#include <stdlib.h> | |
int main(int argc, char *argv[]) | |
{ | |
pid_t pid; | |
int nProc = 0; | |
int i; |
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 UnityEditor; | |
// this will set player defines when building from command line | |
public static class PlaceholderBuild | |
{ | |
// ------------------------------------------------------------------------------------------------- | |
// ------------------------------------------------------------------------------------------------- | |
[MenuItem("Build/Switch FULL version")] | |
public static void buildVersion_PlaceholderFull() | |
{ |
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
[Ll]ibrary/ | |
[Tt]emp/ | |
[Oo]bj/ | |
[Bb]uild/ | |
[Bb]uilds/ | |
Assets/AssetStoreTools* | |
# Visual Studio cache directory | |
.vs/ |
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
foreach(Foos foo in Enum.GetValues(typeof(Foos))) |
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
[ReadOnly] field; |
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 System.Linq; | |
public class EnumUtils<T> | |
{ | |
public static IEnumerable<T> GetAllValues() | |
{ | |
return System.Enum.GetValues(typeof(T)).Cast<T>(); | |
} |
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
public event PropertyChangedEventHandler PropertyChanged; | |
protected void SetField<T>(ref T field, T value, [CallerMemberName] string propertyName = null) | |
{ | |
if (EqualityComparer<T>.Default.Equals(field, value)) return; | |
field = value; | |
OnPropertyChanged(propertyName); | |
} | |
protected virtual void OnPropertyChanged([CallerMemberName]string propertyName = null) => |
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
Vector3 diff = lookAt3dPosition - transform.position; | |
diff.Normalize(); | |
float rot_z = Mathf.Atan2(diff.y, diff.x) * Mathf.Rad2Deg; | |
transform.rotation = Quaternion.Euler(0f, 0f, rot_z - 90); |
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; | |
using System.Reflection; | |
using UnityEditor; | |
namespace Plugins.Gists.Editor | |
{ | |
public static class InspectorLockToggle | |
{ | |
[MenuItem("Tools/Toggle Lock &q")] | |
static void ToggleWindowLock() // Inspector must be inspecting something to be locked |
OlderNewer