2

Scene and Inspector

Script

Hello all,

This is my first time posting here, but I've got a (possibly really stupid) problem. Im looking to make a simple 3d viewer to use in a web page and I want to do this throught Unity (WebGL). This 3D interactive viewer needs to respond to clicks and pass a message to another part of the website.

the things that are going to be clicked are coming from Cinema4D.

my problem shown in the pictures is I want these boxes to be clickable (they will work as filters for another part of the site). But I have not yet found a way to easily do this (I've seen Ray casts passing but I think that that is not needed for something as basic as this).

I am a rookie but willing to learn, if anybody can educate me what im doing wrong that would be great!

Thanks in advance

Sten Martens
  • 61
  • 1
  • 6
  • In your Scene View your script is called `Container_On Click` but your code shows that the class is named `JustAFunction`. Please make sure both names are identical. – Ian H. Sep 19 '17 at 09:02
  • Do not use `OnMouseDown`. Use the `EventSystem`. See #6 from the answer in the duplicate. – Programmer Sep 19 '17 at 09:08
  • but when I do that I get the following error (thats why I changed the name): Assets/Scripts/Container_OnClick.cs(6,14): error CS0101: The namespace `global::' already contains a definition for `Container_OnClick' – Sten Martens Sep 19 '17 at 09:09

0 Answers0