I will ask you a question here for the first time.
Currently, I am making a 2D game using C # in Unity2017.4.33f1.
When I click on a specific background object, I want to connect the player and the clicked coordinates with an object that has one Hinge joint2D that has been converted to Prehub. What should I do?
I visited various sites and tried it, but it didn't work.
It was fine until the Prehub version appeared, but the place where it appeared was strange, and I didn't even connect with the player in the first place.
There is something missing in the script, and I think the Inspector is set up strangely.
using I'm writing UnityEngine, but I get an error in Camera.main.ScreenPointToRay. What should I do? I checked it but couldn't understand it.
ErrorSeverity Level Code Description Project File Line Suppressed
Error CS1061 'object' does not contain a definition for 'ScreenPointToRay' and could not find an accessible extension method 'ScreenPointToRay' that accepts the first argument of type 'object'. Check for missing using directives or assembly references.** C: \ **\ Assets \ script \ GameDirector.cs 14 active
-
Answer # 1
Related articles
- c # - player production in unity (shooting game)
- c # - sound playback in a place different from the place where the unity hit detection occurred
- c # - i want to place objects in a counterclockwise circle
- c # - unity3d implementing a waiting place for captured players
- c # - i want to connect outlets to a specific prefab without converting objects in the scene to prefabs
- c # - i want to create a player respawn process using "setactive"
- unable to connect to mysql from c #
- c # - i want to place a control inside a control that has already been placed with style
- c # - i want to connect common characters from the character strings of each element of list
- c # - about player prefs for unity
- c # - if the player is killed, i want the enemy to wait for a while and restart from the continuation unity
- c # - i want to dynamically generate a tab and dynamically place two listviews on the tab screen
- c # - i want the camera to follow the player character in a tps game, but if i make multiple players in multiplayer, the camera
- c # - determine whether it is an ai or a player, and if you hit an item, stop slowly and restart when the time is over
- if you connect the specified number of images horizontally in c #, you want to start a new line and connect them horizontally in
- c # - [unity] i want to get the clicked object by flying ray to the place where i clicked with the mouse, but i am in trouble be
- c # - i want the player to follow the camera (3d)
- c # - i want to stop the score due to a player collision
- c # - [unity] i want to make the camera follow the player in photon, but if there are multiple players, it will not follow
- c # - i want to solve the problem that i can't click when i place an object under the cursor in unity
- c # - player production in unity (shooting game)
- c # - code error of script implemented by unity cannot be resolved
- c # - ontriggerenter2d does not work
- c # - [unity] i want to start the variables of the script of multiple generated objects individually
- c # - correct/incorrect password gimmick that combines 4-digit numbers
- c # - [unity] in ios, i want to prevent the game from stopping when the notification center or control center is opened
- c # - i want to share variables from other scripts
- c # - no sound in unity games
- c # - about drag and drop in ugui of unity
- c # - it appears in the console window even though it is different from the condition of the unity if statement
Regarding ScreenPointToRay, the script name was Camera.