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
// local | |
// edit the hosts | |
sudo nano /etc/hosts | |
// edit the /Applications/MAMP/conf/apache/extra/httpd-vhosts.conf | |
<VirtualHost *> | |
DocumentRoot "/Users/tomazsaraiva/Documents/example/" | |
ServerName example.localhost | |
</VirtualHost> |
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
Change the action of google-services.json to GoogleServicesJson | |
Generate SHA-1 certificate | |
https://developers.google.com/android/guides/client-auth |
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 void SaveContacts(string Name, string Number) | |
{ | |
var store = new CNContactStore(); | |
var contact = new CNMutableContact(); | |
var cellPhone = new CNLabeledValue<CNPhoneNumber>(CNLabelPhoneNumberKey.Mobile, new CNPhoneNumber(Number)); | |
var phoneNumber = new[] { cellPhone }; | |
contact.PhoneNumbers = phoneNumber; | |
contact.GivenName = Name; | |
var saveRequest = new CNSaveRequest(); | |
saveRequest.AddContact(contact, store.DefaultContainerIdentifier); |
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 abstract class ScreenTransitionData | |
{ | |
public bool Dirty; | |
} | |
public class ScreenTransitionInfo | |
{ | |
public Type Target | |
{ | |
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
public static class Utils | |
{ | |
public static int DpToPixel(int dp) | |
{ | |
return (int)(dp * Resources.System.DisplayMetrics.Density + 0.5f); | |
} | |
} |
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
android:overScrollMode="never" |
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 static Texture2D LoadCRN(byte[] data, bool mipmaps = false) | |
{ | |
ushort width = System.BitConverter.ToUInt16(new byte[2] { data[13], data[12] }, 0); | |
ushort height = System.BitConverter.ToUInt16(new byte[2] { data[15], data[14] }, 0); | |
byte format = data[18]; | |
TextureFormat textureFormat = TextureFormat.RGB24; | |
if (format == 0) | |
{ | |
textureFormat = TextureFormat.DXT1Crunched; |
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 | |
FOR %%f IN (*.jpg) DO crunch -file "%%f" -quality 255 -out %%~nf0.crn -mipMode UseSourceOrGenerate -maxmips 2 | |
FOR %%f IN (*.jpg) DO crunch -file "%%f" -quality 255 -out %%~nf1.crn -mipMode UseSourceOrGenerate -maxmips 2 -rescale 2048 2048 | |
FOR %%f IN (*.jpg) DO crunch -file "%%f" -quality 255 -out %%~nf2.crn -mipMode UseSourceOrGenerate -maxmips 2 -rescale 1024 1024 | |
FOR %%f IN (*.jpg) DO crunch -file "%%f" -quality 255 -out %%~nf3.crn -mipMode UseSourceOrGenerate -maxmips 2 -rescale 512 512 | |
FOR %%f IN (*.jpg) DO crunch -file "%%f" -quality 255 -out %%~nf4.crn -mipMode UseSourceOrGenerate -maxmips 2 -rescale 256 256 | |
FOR %%f IN (*.jpg) DO crunch -file "%%f" -quality 255 -out %%~nf5.crn -mipMode UseSourceOrGenerate -maxmips 2 -rescale 128 128 | |
FOR %%f IN (*.jpg) DO crunch -file "%%f" -quality 255 -out %%~nf6.crn -mipMode UseSourceOrGenerate -maxmips 2 -rescale 64 64 | |
FOR %%f IN (*.jpg) DO crunch -file "%%f" -quality 255 -out %%~nf7.crn -mipMode UseSourceOrGenerate -maxmips 2 -rescale 32 32 |
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; | |
#if UNITY_EDITOR | |
using UnityEditor; | |
[CustomEditor(typeof(MaterialScaleModifier))] | |
public class MaterialScaleModifierInspector : Editor | |
{ | |
private MaterialScaleModifier _target; |
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; | |
public class Builder : MonoBehaviour | |
{ | |
[SerializeField] | |
private GameObject _prefab; | |
[SerializeField] | |
private Vector2 _grid; |
NewerOlder