質問編集履歴
7
リンク追加
test
CHANGED
File without changes
|
test
CHANGED
@@ -48,6 +48,10 @@
|
|
48
48
|
|
49
49
|
|
50
50
|
|
51
|
+
[UdonBehaviour.cs](https://github.com/Shoto9023/up/blob/main/UdonBehaviour.cs)
|
52
|
+
|
53
|
+
|
54
|
+
|
51
55
|
`Assets\Main_UdonProgramSources\StreamKeyRandomizer.cs(18,23): error CS1061: 'UdonBehaviour' does not contain a definition for 'StreamURL' and no accessible extension method 'StreamURL' accepting a first argument of type 'UdonBehaviour' could be found (are you missing a using directive or an assembly reference?)`
|
52
56
|
|
53
57
|
|
6
コード修正
test
CHANGED
File without changes
|
test
CHANGED
@@ -16,15 +16,33 @@
|
|
16
16
|
|
17
17
|
```cs
|
18
18
|
|
19
|
-
|
19
|
+
using UdonSharp;
|
20
|
+
|
21
|
+
using UnityEngine;
|
22
|
+
|
23
|
+
using UnityEngine.UI;
|
24
|
+
|
25
|
+
using VRC.SDKBase;
|
26
|
+
|
27
|
+
using VRC.Udon;
|
20
28
|
|
21
29
|
|
22
30
|
|
23
|
-
|
31
|
+
public class StreamKeyRandomizer : UdonSharpBehaviour
|
24
32
|
|
33
|
+
{
|
25
34
|
|
35
|
+
public UdonBehaviour PlayerAddress;
|
26
36
|
|
37
|
+
void Start()
|
38
|
+
|
39
|
+
{
|
40
|
+
|
27
|
-
VRCUrl
|
41
|
+
VRCUrl target = PlayerAddress.StreamURL;
|
42
|
+
|
43
|
+
}
|
44
|
+
|
45
|
+
}
|
28
46
|
|
29
47
|
```
|
30
48
|
|
5
エラー文を追加
test
CHANGED
File without changes
|
test
CHANGED
@@ -30,6 +30,10 @@
|
|
30
30
|
|
31
31
|
|
32
32
|
|
33
|
+
`Assets\Main_UdonProgramSources\StreamKeyRandomizer.cs(18,23): error CS1061: 'UdonBehaviour' does not contain a definition for 'StreamURL' and no accessible extension method 'StreamURL' accepting a first argument of type 'UdonBehaviour' could be found (are you missing a using directive or an assembly reference?)`
|
34
|
+
|
35
|
+
|
36
|
+
|
33
37
|
![取得元スクリプトインスペクター](80afbe0ef7abb7c015381f97b8c2f443.png)
|
34
38
|
|
35
39
|
|
4
コード修正
test
CHANGED
File without changes
|
test
CHANGED
@@ -24,7 +24,7 @@
|
|
24
24
|
|
25
25
|
|
26
26
|
|
27
|
-
VRCUrl url =
|
27
|
+
VRCUrl url = PlayerAddress.StreamURL;
|
28
28
|
|
29
29
|
```
|
30
30
|
|
3
コードを修正
test
CHANGED
File without changes
|
test
CHANGED
@@ -18,6 +18,14 @@
|
|
18
18
|
|
19
19
|
public UdonBehaviour PlayerAddress;
|
20
20
|
|
21
|
+
|
22
|
+
|
23
|
+
//このあとにこのようなコードで取得・または変更しようとするとエラーを吐かれる
|
24
|
+
|
25
|
+
|
26
|
+
|
27
|
+
VRCUrl url = VRCURLPlayerAddress.StreamURL;
|
28
|
+
|
21
29
|
```
|
22
30
|
|
23
31
|
|
2
画像の追加
test
CHANGED
File without changes
|
test
CHANGED
@@ -19,3 +19,11 @@
|
|
19
19
|
public UdonBehaviour PlayerAddress;
|
20
20
|
|
21
21
|
```
|
22
|
+
|
23
|
+
|
24
|
+
|
25
|
+
![取得元スクリプトインスペクター](80afbe0ef7abb7c015381f97b8c2f443.png)
|
26
|
+
|
27
|
+
|
28
|
+
|
29
|
+
![変更したいスクリプトのインスペクター](fc8345c1be0e79954deaf32b1ce0b779.png)
|
1
コードを追加
test
CHANGED
File without changes
|
test
CHANGED
@@ -7,3 +7,15 @@
|
|
7
7
|
|
8
8
|
|
9
9
|
どのように書けば取得できるのでしょうか?
|
10
|
+
|
11
|
+
|
12
|
+
|
13
|
+
目的のスクリプトコンポーネント自体はPublicで取得しています。
|
14
|
+
|
15
|
+
|
16
|
+
|
17
|
+
```cs
|
18
|
+
|
19
|
+
public UdonBehaviour PlayerAddress;
|
20
|
+
|
21
|
+
```
|