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
public class AssetSpawnerTest | |
{ | |
[UnityTest] | |
public IEnumerator Should_InstantiateObject_When_GivenStringHasNameAndPosition() | |
{ | |
//given | |
String csvString = "CubeX,2,3,3"; | |
String expectedName = "CubeX"; | |
Vector3 expectedCoordinate = new Vector3(2f,3f,3f); |
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
public class AssetSpawner | |
{ | |
public void createAGameObjectFromString(String csvString) | |
{ | |
String[] tokens = csvString.Split(",".ToCharArray()); | |
if (tokens.Length >= 4) | |
{ | |
GameObject cube = GameObject.CreatePrimitive(PrimitiveType.Cube); | |
Vector3 position = new Vector3(float.Parse(tokens[1]),float.Parse(tokens[2]),float.Parse(tokens[3])); | |
cube.name = tokens[0]; |
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
public interface ICsvReader | |
{ | |
string ReadNextLine(); | |
} |
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
public class AssetSpawnerTest | |
{ | |
[UnityTest] | |
public IEnumerator Should_InstantiateObject_When_GivenStringHasNameAndPosition() | |
{ | |
//given | |
// mock the CSV reader | |
var reader = Substitute.For<ICsvReader>(); | |
reader.ReadNextLine().Returns("CubeX,2,3,3"); | |
String expectedName = "CubeX"; |
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
FROM ubuntu:18.04 | |
ENV DEBIAN_FRONTEND noninteractive | |
ENV DEBCONF_NONINTERACTIVE_SEEN true | |
RUN apt-get update -qq; \ | |
apt-get install -qq -y \ | |
locales \ | |
software-properties-common \ | |
unzip \ |
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 UnityEngine; | |
using UnityEngine.UI; | |
public class DataExchanger : MonoBehaviour | |
{ | |
public InputField fld; | |
// a method which can be called from Android app | |
public void ShowMessage(string message) | |
{ |
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
public class UnityFragment extends Fragment { | |
protected UnityPlayer mUnityPlayer; | |
FrameLayout frameLayoutForUnity; | |
public UnityFragment() { | |
} | |
@Override | |
public View onCreateView(LayoutInflater inflater, ViewGroup container, |
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.Reflection; | |
using UnityEditor.ShaderGraph; | |
[Title("Custom", "Gamma Correction Node")] | |
public class GammaCorrectionNode : CodeFunctionNode | |
{ | |
public GammaCorrectionNode() | |
{ | |
name = "Gamma Correction"; | |
} |
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.Reflection; | |
using UnityEngine; | |
using UnityEditor.ShaderGraph; | |
[Title("Custom", "Mirror Texture Node")] | |
public class MirrorTextureNode : CodeFunctionNode | |
{ | |
public MirrorTextureNode() | |
{ | |
name = "Mirror Texture"; |
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.Reflection; | |
using UnityEditor.ShaderGraph; | |
using UnityEngine; | |
[Title("Custom", "Gray Scale Node")] | |
public class GrayScaleNode : CodeFunctionNode | |
{ | |
public GrayScaleNode() | |
{ | |
name = "Gray Scale"; |