unity3d - Using GetPixels correctly in Unity

I'm trying to learn how to use the GetPixels function and I'm trying something simple for now - to get the pixels of the current object of a 2 x 2 area. I just want to display the results in the console first so I can better understand the results of GetPixels.public class timecode : MonoBehaviour {Color[] pixColors = GetPixels(0, 0, 2, 2);// Use this for initializationvoid Start () { Debug.Log(pixColors [0]);}// Update is called once per framevoid Update () {}}I'm getting "The name `GetPixels' does not exist in the current context"...Read more

unity3d - Unity specular in shadow

Specular, not in shadowspecular, in shadwfirst of all, I'm not good at english.there is a problem on realtime lighting. on this scene of the photo, there is only a directional light.I think less or almost no specular on shadow in this environment.Am I overly sensitive?If not, plz let me know how can I solve this problem!...Read more

unity3d - custom clipping shader on top of standard shader? (unity)

I want to draw a horizontal line on an object with shader code (hlsl). The clipping shader simply takes the distance to a given Y-coordinate in the surface shader and checks if it is higher that a given value. If so it will discard. The result is a shader that simply clips away all pixels that are not on a line.void surf (Input IN, inout SurfaceOutputStandard o) { // Albedo comes from a texture tinted by color fixed4 c = tex2D (_MainTex, IN.uv_MainTex) * _Color; float d = abs(_YClip - IN.worldPos.y); // _YClip is is the properties and ...Read more

unity3d - Vungle with Admob mediation in Unity

i have integrated Admob 3.11.1 in Unity 2017.2.0 project. I wanted to add Vungle 5.3.2 as another network in the mediation.I have configured Vungle's console with an custom interstitial placement and rewarded custom placement.Succesfully added the Vungle's placement references into Admob console (as a new ad source).Configured eCPM of Vungle to $100 so it get first in priority.Imported Admob 3.11.1 Unity plugin.Imported vungle .jars from Android export and placed them in Plugins/Android folder. Also tried placing them in Plugins/Android/GoogleM...Read more

(Unity3d) Chartboost and Admob can't Compatible

In my game, there is already a Admob plugin setup, and I want to set up Chartboost plugin too. When I setup the Chartboost plugin, I can't make the apk package. CommandInvokationFailure: Failed to re-package resources. D:\Android\sdk\build-tools\25.0.1\aapt.exe package --auto-add-overlay -v -f -m -J "gen" -M "AndroidManifest.xml" -S "res" -I "D:/Android/sdk\platforms\android-25\android.jar" -F bin/resources.ap_ --extra-packages android.support.v7.appcompat:com.unity3d.player:com.unity.purchasing:com.android.vending.billing:com.google.unity....Read more

unity3d - Using Admob & Adcolony in Unity

first, I hope I understand because I can not speak English well.I am using Unity. Unity version is 5.6.1f1.Admob version and Adcolony version is latest.Originally, Using Admob + Unity Ads mediation.At this time, admob banner load and show successfull.after, i'm add the AdColoy.but, admob banner load fail. so, Test the admob test banner, result is load succeeded.I do not know why the banner failed ad requests.adUnitId is no problem.Please help me if you have any experience with this or if you know the solution....Read more

unity3d - Can't load data-set from obb in Vuforia 7.04 v

I am working in unity 2017.03 with Vuforia 7.04 V.My problem is my apk size 120mb+ so I had to try to split the binary and upload it to the google play store.Before splitting the application was working perfectly, but after splitting it's not working except the AR scenes are all working fine. On testing consol in mobile I get this error : fail to load dataset /storage/emulated0/Android/data/com.xyz.game/files/QCAR/dbname.xmlafter google search I got this codeprivate IEnumerator ExtractObbDatasets () { string[] filesInOBB = {"FriendsJungle_...Read more

Unity3D angle between vectors/directions on specific axis

I have two directions and i am trying to calculate the angle on a specific axis. The object from which the directions are derived is not a static object so i'm struggling to get my head round the maths to work out what i need to do.FYI, I have the start and end points that i have used to calculate the directions if they are needed.Here's a diagram to show what i am looking for:The above image is from a top-down view in unity and it shows the angle i want. The problem can be seen from the above image, which is that the directions are not on the ...Read more

unity3d - Unity: video is playing without sound (2017.3)

When using unity 2017.1 Video is played with sound. And audio without a video also played well.When I upgrade to unity 2017.3 video is played without sound, while audio file without video is played well (sound is on).Edit:When building the application to windows sound is working.The problem seems to appear only in editor....Read more

unity3d - Unity 5.2.1 Build crash on Application.Quit(); with Windows Touch

I am upgrading my Unity 4 project to Unity 5.2.1. I have used Application.Quit(); to close the app on a button click. This worked fine earlier(Unity 4) with Mouse and Touch both and now (Unity 5.2) also works fine with mouse click. But if I click the button using Touch (on Windows 8 or Windows 7 Touch screens) the app crashes. Then I tested by creating a new Unity project and added the cs file with the below code to the main camera. When I click this button with Touch it crashes. But doesn't crash with the mouse click. Is this a bug in Unity 5....Read more