Coroutines in Unity

Mastering Coroutines in Unity in 10 mins:

Repeating timer via recursive coroutine

using UnityEngine;
using System.Collections;

public class Timer : MonoBehaviour
public float waitTime = 3f;

void Start()
StartCoroutine (HarmPlayer());

IEnumerator HarmPlayer()
yield return new WaitForSeconds(waitTime);
print (“Performing some action”);
StartCoroutine (HarmPlayer());

Unity List Add, Linq

pipeHolders = GameObject.FindGameObjectsWithTag (“PipeHolder”);
pipeHolders = pipeHolders.OrderBy (pipeHolder => pipeHolder.transform.position.x).ToArray();

public List points = new List();
List colors = new List();


LINQ in Unity

LINQ for Unity Developers:

LINQ (Language Integrated Query) is a great feature available to C# Unity developers. Many developers don’t know it exists or how to use it though, and lose out on the great time & code savings it can provide. LINQ in Unity has a variety of great uses, and a couple pitfalls you’ll want to avoid.


Programozó fizetések 2017

Programozó fizetések 2017

Webdesign és Webprogramozó fizetések 2016

Forrás Facebook.
Külföld, Budapest, vidék, programnyelvek, végzettség, tapasztalat :–Ko9QOi3HOjeHSdGmJc0WJkwszRgwMjTZM/edit#gid=0

És mennyi lenne a fizetési igénye?” – mégis mit kezdjünk ezzel a kérdéssel? :

Unity collision

detect side of collision in box collider 2d? :

How to find the point of contact with the function OnTriggerEnter???

OnTriggerEnter() does not handle collision information, just detects if there was a collision. So you cannot find the point of collision like you would with OnCollisionEnter().

You could however turn off isTrigger and add a rigidbody component to the object with the collider that you are running OnTriggerEnter() on, and make it a kinematic rigidbody, though. Then it would function just like a trigger, but you could use the collision information in OnCollisionEnter() and get the contact point.

Once you have that, you can get the contact point with OnCollisionEnter like this:

Google: unity OnTriggerEnter contact point

Solved! I put the another object the detection:

void OnTriggerEnter2D(Collider2D target){

if (target.tag== “Player”) {

Debug.Log (“Player Y” + target.transform.position.y);