Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
Empty file added .claude/TODO.md
Empty file.
51 changes: 51 additions & 0 deletions .claude/develop_memo.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
# LTC Decoderとの連携

## 開発目的
- Unity TimeMachineとPackageとして追加されているLTC Decoderと連携する役割をもつコンポーネントを開発したい
- TimeMachineOSCReceiverが参考例
- LTCによるタイムラインの操作と、TimeMachineによるTimelineの操作どちらも受け付けるいいとこ取りができるComponentを開発したい
- LTC DecoderでTCを受信してるときはLTCDecoderとLTC Timeline SyncコンポーネントによるTimeline操作を優先する
- TimeMachineの機能をMuteし、OSCから命令を無視する
- LTC DecoderがLTCを受信できてないときは、TimeMachine本来の機能とOSCによる制御を優先する
- Version Definesで専用のDefineを定義し、疎結合な連携にする
- OSCのプラグインが参考事例

## 開発されるコンポーネント
- TImeMachineLTCReceiver
- Defineでの依存関係
- LTC Decoder
- uOSC
- ExtOSC

## どのように連携するか
- TImeMachineLTCReceiver
- LTCの受信に応じて、TimeMachineとOSCプラグインを操作する
- LTC DecoderがLTCを受信した時
- TimeMachineのMute
- TimeMachineのOSCプラグインが連携されていたら、Ignore OSC CommandsをTrueにする
- LTC DecoderがLTC受信がStopしたとき
- TimeMachineをUnMute
- OSCのIgnoreをFalseに
- TimeMachineのUpdateClipsFinishStateByCurrentTimeを発火
- 各連携イベントはプログラム側でセットアップがすんでいるが、各イベントを実行できるかどうかはInspector側でToggleで設定することもできる



## TimeMachineLTCBridgeの初期セットアップの方法変更
TimeMachine LTC BridgeにAuto Setup Buttonを追加して、LTC Decoder、LTC Timeline Syncの設定を一括でできるようにしたいです。

- TimeMachineLTCBridgeをAdd
- Addされた直後はSetupがされていないので、Auto SetupのButtonが表示されている
- Auto Setup Buttonを押すと、参照関係の解決をおこなう
- TimeMachineControllerの取得
- 同じGameObjectに存在していればGetしてSet
- なければシーンを探して見つかればSet
- OSC Receiverの取得
- 同じGameObjectに存在していればGetしてSet
- 同じGameObjectになければ、シーンを探して見つかればSet
- LTC Timeline SyncとLTC Decoderの取得
- LTC DecoderがScene内を探して見つかればSet
- 見つからなかれば新規でGameObjectを作成し、LTC DecoderをAdd Componentする
- LTC Timeline Syncをシーン内に探しても見つかればSet
- 見つからなかれば同じGameObjectにLTC Timeline SyncをAddし、LTC Timeline Syncの参照にLTC DecoderをSet
- PlayableDirectorはTimeMachineControllerがコントロールしているPlayableDirectorをSet
18 changes: 18 additions & 0 deletions .claude/develop_memoV2.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# TimeMachineLTCBridgeの初期セットアップの方法変更
TimeMachine LTC BridgeにAuto Setup Buttonを追加して、LTC Decoder、LTC Timeline Syncの設定を一括でできるようにしたいです。

- TimeMachineLTCBridgeをAdd
- Addされた直後はSetupがされていないので、Auto SetupのButtonが表示されている
- Auto Setup Buttonを押すと、参照関係の解決をおこなう
- TimeMachineControllerの取得
- 同じGameObjectに存在していればGetしてSet
- なければシーンを探して見つかればSet
- OSC Receiverの取得
- 同じGameObjectに存在していればGetしてSet
- 同じGameObjectになければ、シーンを探して見つかればSet
- LTC Timeline SyncとLTC Decoderの取得
- LTC DecoderがScene内を探して見つかればSet
- 見つからなかれば新規でGameObjectを作成し、LTC DecoderをAdd Componentする
- LTC Timeline Syncをシーン内に探しても見つかればSet
- 見つからなかれば同じGameObjectにLTC Timeline SyncをAddし、LTC Timeline Syncの参照にLTC DecoderをSet
- PlayableDirectorはTimeMachineControllerがコントロールしているPlayableDirectorをSet
24 changes: 24 additions & 0 deletions .claude/settings.local.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
{
"permissions": {
"allow": [
"mcp__serena__search_for_pattern",
"mcp__serena__find_symbol",
"mcp__serena__find_referencing_symbols",
"mcp__serena__find_file",
"mcp__serena__list_dir",
"mcp__serena__get_symbols_overview",
"Read(F:\\works\\Unity_LTCDecoder\\jp.iridescent.ltcdecoder\\Runtime/**)",
"Read(F:\\works\\Unity_LTCDecoder\\jp.iridescent.ltcdecoder\\Runtime\\Scripts/**)",
"Read(F:\\works\\Unity_LTCDecoder\\jp.iridescent.ltcdecoder\\Runtime\\Scripts/**)",
"Read(F:\\works\\Unity_LTCDecoder\\jp.iridescent.ltcdecoder\\Runtime\\Scripts/**)",
"mcp__unity-natural-mcp__refresh_assets",
"mcp__unity-natural-mcp__get_compile_logs",
"Read(F:\\works\\Unity_LTCDecoder\\jp.iridescent.ltcdecoder\\Runtime\\Scripts/**)",
"mcp__unity-natural-mcp__get_current_console_logs"
]
},
"enableAllProjectMcpServers": true,
"enabledMcpjsonServers": [
"unity-natural-mcp"
]
}
8 changes: 8 additions & 0 deletions .mcp.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"mcpServers": {
"unity-natural-mcp": {
"type": "http",
"url": "http://localhost:56788/mcp"
}
}
}
Binary file not shown.
68 changes: 68 additions & 0 deletions .serena/project.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
# language of the project (csharp, python, rust, java, typescript, go, cpp, or ruby)
# * For C, use cpp
# * For JavaScript, use typescript
# Special requirements:
# * csharp: Requires the presence of a .sln file in the project folder.
language: csharp

# whether to use the project's gitignore file to ignore files
# Added on 2025-04-07
ignore_all_files_in_gitignore: true
# list of additional paths to ignore
# same syntax as gitignore, so you can use * and **
# Was previously called `ignored_dirs`, please update your config if you are using that.
# Added (renamed) on 2025-04-07
ignored_paths: []

# whether the project is in read-only mode
# If set to true, all editing tools will be disabled and attempts to use them will result in an error
# Added on 2025-04-18
read_only: false


# list of tool names to exclude. We recommend not excluding any tools, see the readme for more details.
# Below is the complete list of tools for convenience.
# To make sure you have the latest list of tools, and to view their descriptions,
# execute `uv run scripts/print_tool_overview.py`.
#
# * `activate_project`: Activates a project by name.
# * `check_onboarding_performed`: Checks whether project onboarding was already performed.
# * `create_text_file`: Creates/overwrites a file in the project directory.
# * `delete_lines`: Deletes a range of lines within a file.
# * `delete_memory`: Deletes a memory from Serena's project-specific memory store.
# * `execute_shell_command`: Executes a shell command.
# * `find_referencing_code_snippets`: Finds code snippets in which the symbol at the given location is referenced.
# * `find_referencing_symbols`: Finds symbols that reference the symbol at the given location (optionally filtered by type).
# * `find_symbol`: Performs a global (or local) search for symbols with/containing a given name/substring (optionally filtered by type).
# * `get_current_config`: Prints the current configuration of the agent, including the active and available projects, tools, contexts, and modes.
# * `get_symbols_overview`: Gets an overview of the top-level symbols defined in a given file.
# * `initial_instructions`: Gets the initial instructions for the current project.
# Should only be used in settings where the system prompt cannot be set,
# e.g. in clients you have no control over, like Claude Desktop.
# * `insert_after_symbol`: Inserts content after the end of the definition of a given symbol.
# * `insert_at_line`: Inserts content at a given line in a file.
# * `insert_before_symbol`: Inserts content before the beginning of the definition of a given symbol.
# * `list_dir`: Lists files and directories in the given directory (optionally with recursion).
# * `list_memories`: Lists memories in Serena's project-specific memory store.
# * `onboarding`: Performs onboarding (identifying the project structure and essential tasks, e.g. for testing or building).
# * `prepare_for_new_conversation`: Provides instructions for preparing for a new conversation (in order to continue with the necessary context).
# * `read_file`: Reads a file within the project directory.
# * `read_memory`: Reads the memory with the given name from Serena's project-specific memory store.
# * `remove_project`: Removes a project from the Serena configuration.
# * `replace_lines`: Replaces a range of lines within a file with new content.
# * `replace_symbol_body`: Replaces the full definition of a symbol.
# * `restart_language_server`: Restarts the language server, may be necessary when edits not through Serena happen.
# * `search_for_pattern`: Performs a search for a pattern in the project.
# * `summarize_changes`: Provides instructions for summarizing the changes made to the codebase.
# * `switch_modes`: Activates modes by providing a list of their names
# * `think_about_collected_information`: Thinking tool for pondering the completeness of collected information.
# * `think_about_task_adherence`: Thinking tool for determining whether the agent is still on track with the current task.
# * `think_about_whether_you_are_done`: Thinking tool for determining whether the task is truly completed.
# * `write_memory`: Writes a named memory (for future reference) to Serena's project-specific memory store.
excluded_tools: []

# initial prompt for the project. It will always be given to the LLM upon activating the project
# (contrary to the memories, which are loaded on demand).
initial_prompt: ""

project_name: "Unity_TimeMachine"
121 changes: 121 additions & 0 deletions CLAUDE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,121 @@
# CLAUDE.md

This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.


# DO MUST
対話は日本語で行ってください。

## 1. タスク管理・準備段階
1. タスクの確認 - `.claude/TODO.md`でタスクを管理してください
2. タスク作成 - 必ず作業前にタスクはステップバイステップに分割して`.claude/TODO.md`に追加してから作業を開始してください
3. タスク詳細確認 - タスクに詳細が書いてある事があるので必ず確認してください

## 2. 実装段階
1. 優先度順に実装 - `.claude/TODO.md`に記載されているタスクは優先度が高い順に実装していってください
2. ステータス更新 - 作業中のタスクはステータスをIn Progressにし、作業が完了したものはDoneにしてください
3. コミット - タスクが完了したら、作業内容をコメントに入れてコミットしてください
4. 記録 - 実装の際に発生した問題や特記事項などは、そのタスク内のコメント欄に残しておいてください

## 3. 最終確認段階
1. 追加タスク確認 - タスクが終わったら、追加のタスクがないか確認してください
2. 継続作業 - 追加タスクがある場合は同様に進めてください




## Project Overview

Unity TimeMachine is a Timeline extension for Unity that enables complex operations like Pause and Repeat on Unity's Timeline. It's designed for live entertainment and virtual production scenarios.

## Core Architecture

### Package Structure
- **jp.iridescent.timemachine/**: Main package directory containing the TimeMachine Unity package
- **Runtime/**: Core runtime components for Timeline control
- **Editor/**: Custom Unity Editor extensions for TimeMachine
- **Resources/**: Package resources and assets

- **Unity_TimemachineDemoProject~/**: Unity demo project showcasing TimeMachine functionality

### Key Components

1. **TimeMachinePlayer** (`Runtime/TimeMachinePlayer.cs`): Main controller that manages timeline assets and playback
2. **TimeMachineTrackManager** (`Runtime/TimeMachineTrackManager.cs`): Manages timeline tracks and clip events
3. **TimeMachineControlTrack** (`Runtime/TimeMachineControlTrack.cs`): Custom Timeline track for TimeMachine control
4. **TimeMachineControlClip** (`Runtime/TimeMachineControlClip.cs`): Timeline clip implementation
5. **TimeMachineControlMixer** (`Runtime/TimeMachineControlMixer.cs`): Mixer for blending timeline clips

### OSC Integration
- **TimeMachineOscReceiver**: Handles OSC (Open Sound Control) messages for external control
- **TimeMachineExtOscReceiver**: Extended OSC receiver functionality
- **TimeMachineOscDebugUI**: Debug UI for OSC communication

## Development Commands

### Unity Compilation
```bash
# Refresh Unity assets and compile (must be done through Unity MCP tools)
mcp__unity-natural-mcp__refresh_assets

# Check compilation errors
mcp__unity-natural-mcp__get_compile_logs
```

### Running Tests
```bash
# Run Edit Mode tests
mcp__unity-natural-mcp__run_edit_mode_tests

# Run Play Mode tests
mcp__unity-natural-mcp__run_play_mode_tests
```

### Console Management
```bash
# Clear Unity console logs
mcp__unity-natural-mcp__clear_console_logs

# Get current console logs
mcp__unity-natural-mcp__get_current_console_logs
```

## Dependencies

Key Unity packages and dependencies (from `Unity_TimemachineDemoProject~/Packages/manifest.json`):
- Unity Timeline (com.unity.timeline: 1.8.7)
- uOSC for OSC communication (com.hecomi.uosc)
- UniTask for async operations (com.cysharp.unitask: 2.1.0)
- Universal Render Pipeline (com.unity.render-pipelines.universal: 17.0.4)
- Unity Test Framework (com.unity.test-framework: 1.5.1)

## Unity Version Requirements
- Minimum Unity version: 2021.2.0f1 (as specified in package.json)
- Demo project uses Unity 6000.0.33f1 (from ProjectVersion.txt)

## Assembly Definitions
- **TimeMachine.Runtime**: Runtime assembly containing core functionality
- **TimeMachine.Editor**: Editor-only assembly for custom inspectors and tools

## Working with Timeline
TimeMachine extends Unity's Timeline system. When modifying timeline-related code:
1. Understand Unity's PlayableDirector and TimelineAsset APIs
2. TimeMachine clips inherit from PlayableAsset/PlayableBehaviour patterns
3. Custom tracks extend from TrackAsset base class

## Git Workflow
- Main branch: `main`
- Development branch: `develop`
- The repository uses pull requests for feature integration

## Package Installation
Users install the package via Unity Package Manager using:
```
https://github.com/murasaqi/Unity_TimeMachine.git?path=/jp.iridescent.timemachine#v1.0.1
```

## Important Notes
- This is a Unity package project with a demo Unity project included
- The package is designed for live entertainment and virtual production use cases
- OSC integration allows external control of timeline playback
- The project follows Unity's standard package structure and conventions
Binary file modified TouchOSCDebugProject/TouchOSCDebugButtons.tosc
Binary file not shown.
15 changes: 15 additions & 0 deletions Unity_TimemachineDemoProject~/Assets/DefaultVolumeProfile.asset
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!114 &11400000
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 0}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: d7fd9488000d3734a9e00ee676215985, type: 3}
m_Name: DefaultVolumeProfile
m_EditorClassIdentifier:
components: []

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 6 additions & 6 deletions Unity_TimemachineDemoProject~/Assets/ExampleTimeline.playable
Original file line number Diff line number Diff line change
Expand Up @@ -826,8 +826,8 @@ MonoBehaviour:
m_ParentTrack: {fileID: -1600177828722965472}
m_EaseInDuration: 0
m_EaseOutDuration: 0
m_BlendInDuration: 1.8833333333333333
m_BlendOutDuration: -1
m_BlendInDuration: -1
m_BlendOutDuration: 1.8833333333333333
m_MixInCurve:
serializedVersion: 2
m_Curve:
Expand Down Expand Up @@ -994,8 +994,8 @@ MonoBehaviour:
m_ParentTrack: {fileID: -1600177828722965472}
m_EaseInDuration: 0
m_EaseOutDuration: 0
m_BlendInDuration: -1
m_BlendOutDuration: 1.8833333333333333
m_BlendInDuration: 1.8833333333333333
m_BlendOutDuration: -1
m_MixInCurve:
serializedVersion: 2
m_Curve:
Expand Down Expand Up @@ -1143,11 +1143,11 @@ MonoBehaviour:
- {fileID: -3482178434307934598}
- {fileID: 6598553153719685937}
- {fileID: -1969819052405035524}
m_FixedDuration: 0
m_FixedDuration: 30.35
m_EditorSettings:
m_Framerate: 60
m_ScenePreview: 1
m_DurationMode: 0
m_DurationMode: 1
m_MarkerTrack: {fileID: 0}
--- !u!114 &31929576869704199
MonoBehaviour:
Expand Down
18 changes: 18 additions & 0 deletions Unity_TimemachineDemoProject~/Assets/NuGet.config
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<packageSources>
<clear />
<add key="nuget.org" value="https://api.nuget.org/v3/index.json" enableCredentialProvider="false" />
</packageSources>
<disabledPackageSources />
<activePackageSource>
<add key="All" value="(Aggregate source)" />
</activePackageSource>
<config>
<add key="packageInstallLocation" value="CustomWithinAssets" />
<add key="repositoryPath" value="./Packages" />
<add key="PackagesConfigDirectoryPath" value="." />
<add key="slimRestore" value="true" />
<add key="PreferNetStandardOverNetFramework" value="true" />
</config>
</configuration>
2 changes: 2 additions & 0 deletions Unity_TimemachineDemoProject~/Assets/NuGet.config.meta

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 8 additions & 0 deletions Unity_TimemachineDemoProject~/Assets/Packages.meta

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading
Loading