Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 14 Next capture
2021 2022 2023
2 captures
13 Jun 22 - 14 Jun 22
sparklines
Close Help
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
avatar image
0
Question by Rachmanichou · Apr 24 at 07:41 AM · inspectordrag-and-dropreferencingcommunication

Unable to drop GameObject in Inspector of other GameObject

Hi,

Thank you for coming by and reading this post!

I'm currently working on a project which involves a scene that does some drag and dropping, "focusing" mechanics as well as some file writing mechanisms. The way that one scene is organized is:

Drag And Drop Manager:

An empty game object which holds a script of class "DragDropRaycast", which is comprised in the nested namespace draganddrop.raycast (terribly original indeed) and which takes in an empty game object Camera Controller with an attached script of class FocusHandler as follows:

 public FocusHandler focusHandler;

Fetching this class is done by dropping the Camera Controller Game Object in the inspector of the Drag & Drop game object.

Camera Controller:

This empty game object has two scripts attached to it: one that handles the double clicking on an object and another one which operates the rotating of that selected object. This last script has to take in the Drag And Drop Manager because it needs to access a run-time-evolving value that is returned by the "DragDropRaycast" associated class. So this scripts uses the namespace dragdrop.raycast (through the associated command "using dragdrop.raycast" at the very beginning of the code of course). Hence the rotation script has that one line:

 public DragDropRaycast dragdropController;


Problem:

Now this is where the things go wrong. Although the same line and process is done successfully with the camera controller in the drag and drop manager inspector, the Drag And Drop Manager cannot be dragged in the inspector of the Camera Controller for some reason, although the inverse operation does work. In the inspector, when the little round adding button next to the slot for dragging the game object is clicked, no object is proposed.

Other objects and scripts need to access that Drag and Drop Manager associated class so this is a key problem that cannot be circum navigated. These objects are not referenced by the DragDropRaycast script, so the problem does not lie in a sort of "interpenetration" conflict.


Thank you very much for reading, and feel free to ask for any further information!

Comment
Add comment
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

0 Replies

· Add your reply
  • Sort: 

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this Question

Answers Answers and Comments

142 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

Getting a Reference to a Prefab Dragged into Scene 1 Answer

Using interfaces as composeable plugins for a health system 1 Answer

Is there a quicker way to populate animated tiles? 0 Answers

Script forgets assigned Inspector variables 2 Answers

How to find in what Scripts or components an Object is connected 0 Answers


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges