unity

Unity3D - Shader for sprite clipping

匿名 (未验证) 提交于 2019-12-03 01:21:01
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I am trying to create a shader that can be used to clip 2D sprites in a game, I found this shader in another question Shader "Sprites/ClipArea" { Properties { _MainTex ("Base (RGB), Alpha (A)", 2D) = "white" {} _Length ("Length", Range(0.0, 1.0)) = 1.0 _Width ("Width", Range(0.0, 1.0)) = 0.5 } SubShader { LOD 200 Tags { "Queue" = "Transparent" "IgnoreProjector" = "True" "RenderType" = "Transparent" } Pass { Cull Off Lighting Off ZWrite Off Offset -1, -1 Fog { Mode Off } ColorMask RGB Blend SrcAlpha OneMinusSrcAlpha CGPROGRAM #pragma vertex

Cannot read packageName from AndroidManifest.xml

匿名 (未验证) 提交于 2019-12-03 01:12:01
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I have errors in my android manifest file: I tried to look on this website but the answers aren't working for me. <?xml version="1.0" encoding="utf-8"?> < manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.example.brandon.MineDodge" > <application android:allowBackup="true" android:icon="@mipmap/redjet" android:label="@string/app_name" android:theme="@style/AppTheme" > <activity android:name="com.example.brandon.MineDodge.MainActivity" android:label="@string/app_name" > <intent-filter> <action android:name=

HoloLens/Unity - Missing Debug framework Error DEP8000

匿名 (未验证) 提交于 2019-12-03 01:07:01
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I'm running Unity 2018.1.7f1 on Windows 10 Insider Preview 10.0.17711, and suddenly I can't deploy a debug version of my app to HoloLens. It seems to be an issue either with the latest OS preview, or the new version of Unity. Error DEP8000 : Unexpected deployment failure : RemoteCommandException : Windows cannot install package Template3D_1.0.0.0_x86__pzq3xp76mxafg because this package depends on a framework that could not be found. Provide the framework "Microsoft.VCLibs.140.00.Debug" published by "CN=Microsoft Corporation, O=Microsoft

Unity intercept change call handler based on method annotation

匿名 (未验证) 提交于 2019-12-03 01:05:01
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I have a method in a class as follow that I want to intercept: [CustomTag1(Order = 0)] [CustomTag2(Order = 1)] public virtual DoSomething() How can I inject the order value into ICallHandler.Order property, when using CustomAttributeMatchingRule ? I don't want the order to be hard coded to the handler itself or at registration. I want it to be a variable of the Order property of the method annotation. 回答1: I've achieved this using the HandlerAttribute - in general I use this anyway for attribute-style interception in Unity simply because you

Issue resolving dependencies with Unity

匿名 (未验证) 提交于 2019-12-03 00:58:01
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: As soon as i'm trying to resolve my unitOfWork i get this error : "The type IUnitOfWork does not have an accessible constructor." However this only happens when i set the LifetimeManager of the unitOfWork to PerResolveLifetimeManager. If I'm just using the default one, everything works fine. My unitOfWork, do have a public parameterless constructor. This is my code : //Global asax IUnityContainer unity = new UnityContainer(); unity.RegisterType<HomeController>(); unity.RegisterInstance<IUnitOfWork>(new UnitOfWork(), new

Unity - “SetDestination” can only be called on an active agent that has been placed on a NavMesh. UnityEngine.NavMeshAgent:SetDestination(Vector3)

匿名 (未验证) 提交于 2019-12-03 00:56:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I'm using Unity5 right now. I got this error when try to setDestination. "SetDestination" can only be called on an active agent that has been placed on a NavMesh. UnityEngine.NavMeshAgent:SetDestination(Vector3) CompleteProject.EnemyMovement:Update() (at Assets/_CompletedAssets/Scripts/Enemy/EnemyMovement.cs:30) My code. Please advice. Thank you. Reference: https://github.com/datomnurdin/SurvivalShooter 回答1: You need to add a Navmesh to your scene before you can use NavMeshAgent or anything else related to Navigation. Here's some videos by

Failed to compile to android (Unity)

匿名 (未验证) 提交于 2019-12-03 00:56:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I am trying to compile my VR project to an android phone. However i keep getting the following error: Failed to compile resources with the following parameters: -bootclasspath "C:/Program Files (x86)/Android/android-sdk\platforms\android-26\android.jar" -d "C:\Users\**\Documents\**\**\Temp\StagingArea\bin\classes" -source 1.6 -target 1.6 -encoding UTF-8 "com\google\gvr\keyboardsupport\R.java" "com\google\gvr\permissionsupport\R.java" "com\google\vr\cardboard\R.java" "com\google\vr\keyboard\R.java" "com\***\**\R.java" "com\unity3d\unitygvr\R

Print message in Unity console when a GameObject hits a trigger? Unity5/2D

匿名 (未验证) 提交于 2019-12-03 00:56:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I'm working on a "Game" for school, and I need to tally votes. I'm using unity to have characters jump on buttons to count the votes and move on to the next question. This is what I have so far: using UnityEngine; using System.Collections; public class Vote1 : MonoBehaviour { private int vote1; public GameObject hero_1; void Start () { vote1 = 0; } void Update () { } void OnCollisionEnter2D(Collision2D coll) { if (coll.gameObject.tag == "PlayerObject"){ vote1 = vote1 + 1; print("One Vote Added"); } } } This should be adding +1 when "hero_1"

Library not found for -lGTMSessionFetcher

匿名 (未验证) 提交于 2019-12-03 00:56:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: Unity 5.6.2, Firebase Unity SDK 4.0.3, Cocoapod 1.3.1 I added Firebase Auth package to Unity Project and Android works fine. But when I run the same project on iOs, build in Unity runs fine, but fails in XCode during compilation ld: library not found for -lGTMSessionFetcher clang: error: linker command failed with exit code 1 Any ideas how to fix it? I've tried to add Firebase Auth form Unity SDK 4.1.0, but Unity started to fail due to: iOS framework addition failed due to a Cocoapods installation failure. Specs satisfying the 'Firebase

Unity Error: The given assembly name or codebase was invalid

匿名 (未验证) 提交于 2019-12-03 00:52:01
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I am using the microsoft unity frame work and getting this error: ********** 4/15/2012 9:46:08 AM ********** Inner Exception Type: System.IO.FileLoadException Inner Exception: The given assembly name or codebase was invalid. (Exception from HRESULT: 0x80131047) Inner Source: mscorlib Inner Stack Trace: at System.RuntimeTypeHandle.GetTypeByName(String name, Boolean throwOnError, Boolean ignoreCase, Boolean reflectionOnly, StackCrawlMarkHandle stackMark, Boolean loadTypeFromPartialName, ObjectHandleOnStack type) at System.RuntimeTypeHandle