Sushisushi-sandesu / sushi

:sushi:
0 stars 0 forks source link

Oculus Camera App Prototype #11

Closed natezzz closed 8 years ago

natezzz commented 8 years ago

Added basic functionality for camera app. (Take screenshots by pressing F key)

tomoasleep commented 8 years ago

Are there left tasks which you should do before we start to implement touch interaction features? If there are not, we review your code in order to merge :+1:

natezzz commented 8 years ago

@tomoasleep Nope, except that I haven't tested the code because I don't have a Leap Motion at hand. If with Leap it can display screenshot correctly, then it's okay to merge.

tomoasleep commented 8 years ago

OK, we check and review your implementation :+1:

@Sushisushi-sandesu/leap-team というわけでよろ :pray:

ganmacs commented 8 years ago

:eyes: :+1:

tomoasleep commented 8 years ago

I think the default code format of MonoDevelop is Mono, but it is ok to space between method names and parentheses.

natezzz commented 8 years ago

@tomoasleep Yes. The default is Mono style. However I used "visual studio" style for this code.

natezzz commented 8 years ago

Ah. Clicked "close" by accident.

tomoasleep commented 8 years ago

I see :bowtie:

tomoasleep commented 8 years ago

I think your code style is different from Visual Studio code style in if statement and method call. https://msdn.microsoft.com/en-us/library/ff926074.aspx

natezzz commented 8 years ago

@tomoasleep Yes. The Mono formatter didn't format the code completely according to the Microsoft convention. I don't know why. Maybe we should use mono style instead?

tomoasleep commented 8 years ago

Looks good to me (OK to merge if another one says OK)

tomoasleep commented 8 years ago

Forget to check if it moves... I check it now.

natezzz commented 8 years ago

thank you!

On Dec 2, 2015, at 13:02, Tomoya Chiba notifications@github.com<mailto:notifications@github.com> wrote:

Forget to check if it moves... I check it now.

Reply to this email directly or view it on GitHubhttps://github.com/Sushisushi-sandesu/sushi/pull/11#issuecomment-161174860.

tomoasleep commented 8 years ago

I tried to build the code, but the following error occurred.

Assets/Scripts/ScreenShotScript.cs(3,7): error CS0246: The type or namespace name `UnityEditor' could not be found. Are you missing a using directive or an assembly reference?

I think the namespace UnityEditor can be used only for Editor scripts. http://answers.unity3d.com/questions/316805/unityeditor-namespace-not-found.html http://answers.unity3d.com/questions/576746/build-error-the-type-or-namespace-name-unityeditor.html

natezzz commented 8 years ago

@Sushisushi-sandesu/all Review plz. Please hold. The audio is not working correctly. Need to fix

natezzz commented 8 years ago

@Sushisushi-sandesu/all Review plz.

natezzz commented 8 years ago

Now master is merged into camera-app. @Sushisushi-sandesu/all ready for review.

ganmacs commented 8 years ago

good 😎

natezzz commented 8 years ago

@ganmacs It is working?

ganmacs commented 8 years ago

Not checking it is working in my environment. i just read code. Is it working in your environment,isn't it?

natezzz commented 8 years ago

Yeah it is working fine.

ganmacs commented 8 years ago

awsome👌 let's merge👌

takuti commented 8 years ago

@natezzz from now, i will confirm to run. plz wait a minute :hand:

natezzz commented 8 years ago

Ok thank you

takuti commented 8 years ago

Anyway, should I need to build stand alone? Is running procedure same as sample app?

natezzz commented 8 years ago

@takuti it should work in the preview and also as a standalone. Settings are the same

takuti commented 8 years ago

hmm...my preview window is:

screen shot 2015-12-03 at 8 26 42 pm

There is a white screen to show captured image, but camera doesn't work by pressing F. Do you have any idea?

natezzz commented 8 years ago

@takuti Sigh... This is the same problem happened last time we I check the camera app with Leap Motion. It doesn't seem to capture the image taken by Leap.

I don't have a leap at hand so I cannot fix it yet.

natezzz commented 8 years ago

@takuti I think it happened because the image taken by Leap Motion is not part of the scene. Need to implement some workaround. E.g. Display the image on a canvas whenever taking screenshot etc.

takuti commented 8 years ago

@natezzz I see. So, how did you check if it works?

natezzz commented 8 years ago

@takuti It captured whatever components I put on the screen. And it also captured the warning sign after running. So it's just the Leap's image is being ignored.

natezzz commented 8 years ago

@takuti if you add some buttons into the scene, it should be capturing them.

The original UnityWebcamSample worked fine because it was capturing the image on a canvas. Now there is no canvas. I think that is the problem.

takuti commented 8 years ago

@natezzz

> And it also captured the warning sign after running.

really? i wasn't able to capture that..

takuti commented 8 years ago

When I run that, LastScreenShot canvas emit warning as The referenced script on this behavior is missing

natezzz commented 8 years ago

@takuti Really?? In that case the problem is with the .meta files.

takuti commented 8 years ago

I think so. ScreenShotScript is not loaded by the canvas. I will try again from the beginning....

natezzz commented 8 years ago

@takuti On this page, it says if the .meta files are messed up, it will report "missing scripts"

natezzz commented 8 years ago

@takuti Can you try go to Edit-Project settings-editor and change the meta file settings to "Visible meta files"?

natezzz commented 8 years ago

@takuti It would be awesome if we could meet after 輪講 to deal with this problem...

takuti commented 8 years ago

@natezzz Tried again from git clone, but it didn't work. Also, visible meta files shows no positive effect.

ScreenShotScript is not connected to the canvas. ---> connect ---> lots of errors like NullReferenceException

takuti commented 8 years ago

!!!!

natezzz commented 8 years ago

@takuti Can you show me a screenshot of the unity console screen after pressing "F"?

takuti commented 8 years ago

It works (also w/ LeapMotion cam)!!

ok

All errors are caused because,

screen shot 2015-12-03 at 9 14 35 pm

all of them are not loaded in an initial cloned repository.

natezzz commented 8 years ago

ああああああああああ、泣きそう @takuti

natezzz commented 8 years ago

@takuti But what caused it not to be loaded though?

But it's awesome that it worked!!

takuti commented 8 years ago

:tada: :tada: :tada: :tada: :sun_with_face:

takuti commented 8 years ago

@natezzz I don't know...are any important files describing connection between the canvas and related files in .gitignore...?

takuti commented 8 years ago

After solving the initial loading problem, we can merge this pull request :fearful:

natezzz commented 8 years ago

@takuti Yes!

However I think the .meta files in this commit are indeed broken.

takuti commented 8 years ago

@natezzz Now my sushi project repo works correctly, and current output of git status is

On branch camera-app
Your branch is up-to-date with 'origin/camera-app'.
Changes not staged for commit:
  (use "git add/rm <file>..." to update what will be committed)
  (use "git checkout -- <file>..." to discard changes in working directory)

        modified:   Assets/_Scenes/CameraScene.unity
        deleted:    Assets/_Scenes/MainScene.unity.meta
        modified:   ProjectSettings/AudioManager.asset
        modified:   ProjectSettings/DynamicsManager.asset
        modified:   ProjectSettings/EditorBuildSettings.asset
        modified:   ProjectSettings/EditorSettings.asset
        modified:   ProjectSettings/GraphicsSettings.asset
        modified:   ProjectSettings/InputManager.asset
        modified:   ProjectSettings/NavMeshAreas.asset
        modified:   ProjectSettings/NetworkManager.asset
        modified:   ProjectSettings/Physics2DSettings.asset
        modified:   ProjectSettings/ProjectSettings.asset
        modified:   ProjectSettings/QualitySettings.asset
        modified:   ProjectSettings/TagManager.asset
        modified:   ProjectSettings/TimeManager.asset

Untracked files:
  (use "git add <file>..." to include in what will be committed)

        Assets/Scripts/ScreenShotScript.cs.meta
        Assets/_Scenes/CameraScene.unity.meta

Hence, the reasons will be in them.