- Workaround is setting the Cell Gap to -0.01 on the Grid itself. https://discussions.unity.com/t/tilemap-has-tearing-between-tiles-even-with-pixel-snap/679199/37
- "all your methods except the sprite atlas are fake solutions, and will betray you when you move the camera" https://forum.unity.com/threads/the-best-way-to-fix-tile-tearing.1542956/#post-9619289
- Create sprite atlas with padding = 2 https://forum.unity.com/threads/artifacts-in-a-2d-pixel-art-scene.1427049/#post-8959284
- disable antialias
- use pixel snap shader material
- texture importer: point filter
- use unity pixel perfect camera package
- scale grid by small amount (0.999, 1.001)
- resolution issue? float camera pos
This file contains hidden or 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; | |
using System.Collections.Generic; | |
using Nrjwolf.Tools.AttachAttributes; // https://github.com/Nrjwolf/unity-auto-attach-component-attributes | |
using TMPro; | |
using UnityEngine; | |
[RequireComponent(typeof(TextMeshProUGUI))] | |
public class TextMeshProTeletypeEffect : MonoBehaviour | |
{ | |
[GetComponent] [SerializeField] private TextMeshProUGUI m_TextMeshProUGUI; |
This file contains hidden or 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; | |
using System.Collections.Generic; | |
using UnityEngine; | |
public class HomingMissile : MonoBehaviour | |
{ | |
[GetComponent] [SerializeField] private Rigidbody2D m_Rigidbody2D; | |
public Rigidbody2D Rigidbody2D { get => m_Rigidbody2D; } | |
public Transform Target; |
This file contains hidden or 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
interface LitePresenter<T : Any> { | |
fun attachView(view: LiteView<T>) | |
fun detachView() | |
} | |
open class BaseLitePresenter<T : Any> : LitePresenter<T> { | |
private val buffer = ArrayList<T>() | |
private var view: LiteView<T>? = null | |
private var firstAttached = false |
This file contains hidden or 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
private void takePicture() { | |
Intent takePictureIntent = new Intent(MediaStore.ACTION_IMAGE_CAPTURE); | |
if (takePictureIntent.resolveActivity(getPackageManager()) != null) { | |
Uri photoURI = null; | |
try { | |
File photoFile = createImageFileWith(); | |
path = photoFile.getAbsolutePath(); | |
photoURI = FileProvider.getUriForFile(MainActivity.this, | |
getString(R.string.file_provider_authority), | |
photoFile); |
This file contains hidden or 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
fixed3 Darken (fixed3 a, fixed3 b) | |
{ | |
return min(a, b); | |
} | |
fixed3 Multiply (fixed3 a, fixed3 b) | |
{ | |
return a * b; | |
} |
This file contains hidden or 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 await(continuation) | |
local coro = coroutine.running() | |
local result | |
local async | |
continuation(function(err, value) | |
if async == nil then | |
async = false | |
result = value | |
if err then error(err) end | |
return |