kandi X-RAY | Unity3D Summary
kandi X-RAY | Unity3D Summary
Unity3D
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of Unity3D
Unity3D Key Features
Unity3D Examples and Code Snippets
Community Discussions
Trending Discussions on Unity3D
QUESTION
I'm just learning unity3d. I need to show particles every time the speed of the object exceeds 6km. The problem is that it doesn't always work, and it doesn't work in the right way. Why does this happen and how to fix it? The problem itself starts after the first interruption. Code Example:
...ANSWER
Answered 2022-Mar-15 at 20:36I think you have confused yourself by using a conditional operator. If the condition is true, the first option will be used.
QUESTION
i've a problem with my object contained in the Bundle because it is instancied without textures (materials). Now i will explain you what i've do. I've installed AssetBundles Browser package into unity for make me easier the creation of AssetBundles. I've created a prefab called "Cheese2" with some components attached
This is the inspector of the object
And i've created a new AssetBundle called "test2"
After this i've looked at the AssetBundle Browser and i've saw that the AssetBundle has been configured corretly with all his dependencies (AssetBundles Browser include automatically all the dependencies of the object)
This is the AssetBundles Browser windows with my Bundle "test2" and all the Assets
Ok, after this i've build the bundle into my folder "StreamingAssets" and has been created some files
Now it's time to see the script:
...ANSWER
Answered 2022-Mar-10 at 16:19i've found the solution. The problem is of the unity "game" simulator, i've see this post on reddit and i've thought "wait, if i try the application on my phone, does it work correctly?". The Answer is YES, on my Phone it works correctly and all the textures are charged with the asset.
QUESTION
i'm trying to make a custom editor script for Unity, but i'm stuck in what I thought would be an easy step. When using UnityEditor.GetWindow(), the window doesn't open in the main tab but as a separate Window. The scene view is not attached to the main Unity window.
I've tried a few workarounds but none seem to work:
First I tried to use the desiredDockNextTo parameter from the API, but I keep getting an error i'm not able to fix.
...
ANSWER
Answered 2022-Mar-02 at 16:41First of all typeof
expects a compile time constant type not a dynamic variable.
So if something it should be e.g.
QUESTION
I'm using Unity3D with MRTK for Hololens 2 development.
As you can see in the picture I gat a Square
-Gameobject and a AppBar
-Gameobject. The Square
hast MRTK BoundsControl
attached to it which make it transformable. The user can change the size and rotation of the Square
with the handles.
On every change the user does the AppBar
should stick to the left border of the Square
.
The Object
-Gameobject has a scale of: X: 1, Y: 1, Z: 1.
The Square
-Gameobject has a scale of: X: 0.15, y: 0.15, Z: 0.009.
When I scale the Square
with the handles only the scale of the Object
changes the scale of the Square
is staying the same all the time.
I already tried this code but it doesn't work properly:
...ANSWER
Answered 2022-Feb-23 at 08:55Add an empty object to the edge of the object that gets scale up/down. It needs to be on the edge so that when the main object gets modified, it will remain on the border.
Add this code to a script on the UI:
QUESTION
I have a Gitlab CI pipeline that's building a Unity project which has packages being pulled from a git repository. There are a number of packages, but they're all in one of two groups, and I can get a PAT for both (I can't use SSH keys in this particular instance due to some other constraints). Unity uses the git credential manager to authenticate for packages (details), but I'm unsure how to actually add those credentials to the helper from the command line.
The runner is using the Shell executor on a Windows 10 machine, and I can inject the PATs using environment variables, but the part I don't know how to do is get them added to the credential manager, and in this case they will need to be scoped to the specific group URLs similar to this answer. The git installation on this machine is also configured to use the Windows Credential Manager.
...ANSWER
Answered 2022-Mar-01 at 07:02how to do is get them added to the credential manager
In command line
QUESTION
I use VS Code
for C#
and Unity3D
and TypeScript
and Angular
and Python
programming, so I have pretty much every required extension, including the .NET Framework
and Core
as well as the Quantum Development Kit (QDK)
plus the Q# Interoperability Tools
and also C#
and Python
extensions for VS Code
.
I have devised the following steps to create my first quantum Hello World based on a few tutorials:
...ANSWER
Answered 2022-Feb-27 at 10:24With help from a user on another forum, it turns out the problem was the command:
QUESTION
--LONG VERSION--
I made a super basic REST API to handle user account management (account creation, checking login credentials, etc.) that I will call from a Unity3D game, for which I plan to support mobile (mainly android).
Players would upload drawings that they'd make with a drawing tool that exists inside of the Unity game. I made that tool for the sole purpose of preventing the possibility of someone either uploading a screenshot of a drawing that they didn't draw themselves, or someone uploading a selfie or a pornographic photo (for which I cannot allow the possibility to happen, since my game is primarily targeted to children), and those drawings can be publicly viewed by other players.
--SHORT VERSION--
To store an uploaded drawing I would use a simple $_GET['base64']
, but in order to prevent disallowed images from coming in, how can I assure that the request is coming from an official android build and not, say, some cURL or a reverse-engineered Unity project?
That's the whole question.
In the case of a WebGL build I could just block any web request that is not coming from the domain that the WebGL build is in, but in the case of the android build however, as far as I know the server can't really tell a request sent by an official android build from some request sent by a cURL. And I'm pretty sure that someone, with a bit of effort, can figure out how my REST API works. I have no idea of how to effectively secure it.
I'd like some suggestions, and if you think that my current approach is terrible (and it probably is) tell me how to improve on it or what to replace it with.
...ANSWER
Answered 2022-Feb-22 at 23:03If you are serious about preventing unauthorized clients from sending images to your server the easiest way is to forget about dealing with images entirely.
Instead, I would have the clients and servers work with input data.
Have the client record the inputs the user makes to create their drawing (or, if that is too much, something that approximates the outcome of their inputs, such as sequences of line segments, colors, stroke widths, sticker ids, whatever your drawing system uses). As they draw the image, replace what they just drew with your system's representation of it so they can be certain of its appearance before sending.
Send, receive, and store the input data as needed
When the appearance of the drawing is needed, play back the recording to reproduce the drawing.
This is essentially how Jackbox does their drawing games, for instance.
Using this method, someone could try to reproduce a vague depiction of a selfie or pornography with your API of input data BUT if you do things like limit the size of the data, limit the fidelity of the colors, limit the resolution of the start and end of the line segments, etc, the capacity for these things to be reproduced is further and further reduced until it becomes unfeasible.
QUESTION
I work on Unity3D and I have a Vector3 array, this array is the vertex of a polygon. Now I try to Generate a random point inside the polygon and I don't know how many vertex I have.
e.g:
...ANSWER
Answered 2022-Feb-12 at 11:35I find a nice way to do that with the next snippet:
QUESTION
I'm asking this because I want to eliminate the "Failed to insert item" warnings in a Unity project, which is caused by amount of scripts exceeding a certain value. Here is a solution provided by unity, which suggests applying [AddComponentMenu("")]attribute to all monobehaviours accordingly.
Since I'm working on a project with lots of scripts, it seems very difficult to apply this attribute manually. I need to:
- Finding all classes under \Assets\Scripts (or in Assembly-CSharp) who inherit monobehaviour or any of its child class
- Applying [AddComponentMenu("PATH")] attibute to the classes found above and put the realtive path of the script in the "PATH"
I don't know how to implement these and have been failing to find a solution by myself.
Some additional features would be wonderful (not necessary):
- If there is existing [AddComponentMenu("")] in the script, do not override the original one.
- Automatically applying [AddComponentMenu("")] to the scripts to be created.
Looking forward to all kinds of help. Thanks a lot!
...ANSWER
Answered 2022-Feb-09 at 11:01There are probably many ways to do this outside of Unity. However, I will assume you want to do it all in Unity itself just for the simpleness of things.
Remark: There are for sure edge-cases left but I hope this is a good starting point
Finding all classes under \Assets\Scripts (or in Assembly-CSharp) who inherit monobehaviour or any of its child class
This first point would be quite simple - kind of. The Assets don't allow to find script types themselves but you can get all script assets by searching for t:MonoScript
in the search bar in the Assets view.
The same can be done also via script using AssetDatabase.FindAssets
like e.g.
QUESTION
I am just starting to learn Unity/C#.
One thing I am confused about in the C# scripts is that variables from classes are used, but the classes arn't directly accessed?
For example:
...ANSWER
Answered 2022-Feb-05 at 13:15As various commenters are trying to say; it is part of the MonoBehaviour
class, which is accessible for within the Start
function, because your Test
class inherits everything MonoBehaviour
has.
See this documentation: https://docs.unity3d.com/ScriptReference/MonoBehaviour.html
Other available properties are:
- runInEditMode
- useGUILayout
- enabled
- isActiveAndEnabled
- gameObject
- tag
- transform
- hideFlags
- name
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install Unity3D
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page