Quantcast
Channel: Answers by "Kaan-Yy"
Browsing latest articles
Browse All 22 View Live
↧

Answer by Kaan-Yy

With script you can: public Sprite alpha; // Use this for initialization void Start () { gameObject.GetComponent().material.mainTexture = alpha.texture; }

View Article


Answer by Kaan-Yy

I have not tested but if you switch "Inspector" to Debug Mode; you can set "Cast Shadows" and "Receive Shadow" properties of Sprite Renderer. (In order to Switch Debug Mode in editor; click on the icon...

View Article


Answer by Kaan-Yy

Sorting Layer is related with rendering. Although you are developing a 2D game, actually you are working on a 3D system. Your sprites are on same index "Z" in Z layer. User touches and moues touches...

View Article

Answer by Kaan-Yy

You can use OnMouseEnter and Exit; but it will not work on Mobile. Update function is executed on all game objects and when there is a hit (it does not matter what it hits); all of them change it's...

View Article

Answer by Kaan-Yy

I had the same problem and here is my solution: Duplicate the item (A) with hinge joint and name it to (B). Remove sprite from A. Remove all the physics components (rigidbody, hingejoint, collider,etc)...

View Article


Answer by Kaan-Yy

You should not trust SystemInfo.deviceUniqueIdentifier. It creates different id's on some devices (for example on Galaxy Tab 3) if it's wireless is enabled or not. Because if wireless is not enabled...

View Article

Answer by Kaan-Yy

C# does not allow you to inject a dynamic variable. However you can create a mono behaviour which contains a dictionary of string and objects and add this behaviour as a component to any game object...

View Article

Answer by Kaan-Yy

In our games; we generally calculate time consuming calculation in a different thread. The non ui thread sets a boolean so that ui thread can pick up the results. [Here is how we do it][1]. [1]:...

View Article


Answer by Kaan-Yy

We figured out hat this can be solved with http://docs.unity3d.com/Manual/class-RenderTexture.html. However; with proper sorting; draw calls dramatically reduced to 2-3 calls; so we did not need id....

View Article


Answer by Kaan-Yy

Here is the shader we copied from Unity's standart sprite shader and modified to shine certain location of sprite. You can change ShineLocation and ShineWidth to make an shine animation through c#...

View Article

Answer by Kaan-Yy

Hi; all you have to do is download "C source code as an amalgamation" from http://sqlite.org/download.html. Easiest way to compile is Visual Studio Community Edition (2015). Download it. Install cross...

View Article
Browsing latest articles
Browse All 22 View Live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>