unity3d-editor

Unity3D Editor: How can I find all usages of a given asset?

只愿长相守 提交于 2020-01-23 12:25:31
问题 The very useful feauture "Find usages" exists in Visual Studio and Resharper, but I can't find the same in Unity3D Editor. I see only "Select dependencies" in Unity3d, but I need the opposite one. Does it exist? 回答1: Unfortunately, Unity Editor allows you to find usages of an asset in Scene only. Moreover, what you get is selected list of assets using it, so after changing the mouse focus you'll lose your selection There's a solution on Asset Store that does: Find all usages of an asset, both

Unity3D Editor: How can I find all usages of a given asset?

☆樱花仙子☆ 提交于 2020-01-23 12:25:06
问题 The very useful feauture "Find usages" exists in Visual Studio and Resharper, but I can't find the same in Unity3D Editor. I see only "Select dependencies" in Unity3d, but I need the opposite one. Does it exist? 回答1: Unfortunately, Unity Editor allows you to find usages of an asset in Scene only. Moreover, what you get is selected list of assets using it, so after changing the mouse focus you'll lose your selection There's a solution on Asset Store that does: Find all usages of an asset, both

Why material added to ui panel is not visible in android build but works fine in editor window in unity3d?

微笑、不失礼 提交于 2020-01-06 06:47:21
问题 The material added to the UI Panel is working in the editor window but not working in android build. How to fix this? Editor Screenshot Android screenshot Note: I have tried adding a shader to "always Included shader" list in the project setting menu. still not fixed. I'm not altering the shader/material in the code. This is worked fine in a previous unity version. (my unity version is 2018.3.11f1) The same material works fine in other game objects (like a cube, etc,.), but not works with any

Unity3d Error: “String too long for TextMeshGenerator. Cutting off characters.”

陌路散爱 提交于 2020-01-05 09:21:31
问题 I keep getting this Error With no StackTrace: "String too long for TextMeshGenerator. Cutting off characters." did anyone else face this in Unity3d version 5.0.2f1 ? should i care about it or just ignore it? 来源: https://stackoverflow.com/questions/31205173/unity3d-error-string-too-long-for-textmeshgenerator-cutting-off-characters

Unity Custom Inspector with sub-inspectors

♀尐吖头ヾ 提交于 2019-12-23 16:47:54
问题 I am working on a small ARPG in Unity 2017.2. I have tried implementing a custom editor for the AbilityBluePrint class of my game. Basically, the AbilityBluePrints contain all the information necessary to generate the Ability at run time. Including an array of Effect[] ScritpableObjects which get triggered when the ability is used. I currently have everything I need implemented and working but I envisage creating abilities to be very tedious for the following reason. Say I have an effect

How to switch on/off statistics panel in editor while playing?

╄→尐↘猪︶ㄣ 提交于 2019-12-23 04:52:11
问题 I want to switch this panel on/off by C# script while playing. Is this possible? Haven't found any Editor API functions for this. 回答1: You can do it with reflection. Modified similar answer I made long ago. Below is a working set/get stats function. Tested with Unity 5.4.0f1 . I put the Unity version so that people won't complain when it stops working. Unity's update can break this anytime if they rename any of the variables. GameView = A class that is used to represent Unity GameView tab in

How to select elements in nested ReorderableList in a CustomEditor?

十年热恋 提交于 2019-12-18 04:48:11
问题 I have a ReorderableList in my CustomEditor script. In the drawElementCallback I added a second nested ReorderableList . Everything works fine and I can add elements to both lists like here BUT as you can see for some reason I can not select the elements of the inner ReorderableList s so I also can not remove items. How can I select items in the inner list? Here the classes broken down to the basic example using System; using System.Collections.Generic; using UnityEditor; using

How can I color a PrefixLabel in Unity Editor?

南楼画角 提交于 2019-12-13 03:57:00
问题 My question is that simple: I just want to be able to use EditorGUILayout.PrefixLabel but change the text color to white. But so far I have no luck. I can easely change the color of all other elements but for the PrefixLabel nothing is working. I want to stick with PrefixLabel since it simply is less code to have all labels and fields arranged well. A fiew things I tried so far: using EditorStyles.label.normal.textColor var old = EditorStyles.label.normal.textColor; EditorStyles.label.normal

Editor Window screenshot

 ̄綄美尐妖づ 提交于 2019-12-11 03:27:02
问题 I want to capture a screenshot from a custom EditorWindow that I'm using as a LevelEditor for a game I'm working on, but i'm not sure on how to do it. What I want is to capture the EditorWindow, NOT the game view or the scene view. Can you help me? Thanks! Edit: I want to take screenshots by code, when pressing a GUILayout.Button :) 回答1: I made a script for this using InternalEditorUtility.ReadScreenPixel . At first I actually had it as you requested on a GUILayout.Button but decided to